Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11857 for code


Ignore:
Timestamp:
Apr 12, 2018, 4:09:58 PM (7 years ago)
Author:
andera
Message:

the counter in the beginning of the game has been editted. New checkpoint pointer has been added. New arrow is made in blender but not uploaded yet

Location:
code/branches/RacingBots_FS18
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/RacingBots_FS18/data/levels/newnewnewspacerace.oxw

    r11783 r11857  
    229229   
    230230    <!-- distance = how far from the middle point of a check point do i have to fly ? distance variable answers this question   -->
     231   
     232
     233     
    231234
    232235
     
    491494</checkpoints>
    492495</SpaceRaceManager>
    493 
     496   <Arrow>
     497      <attached>
     498       <Model scale="5" mesh="tutorialpointer3.mesh"/>
     499      </attached>
     500      <controller>
     501        <ArrowController accuracy = 2000>
     502          <gpspoints>
     503            <Model mesh="cube.mesh" scale=1.5 position="1000,30,0"/>
     504            <Model mesh="cube.mesh" scale=1.5 position="3000,200,100"/>
     505            <Model mesh="cube.mesh" scale=1.5 position="5000,100,500"/>
     506            <Model mesh="cube.mesh" scale=1.5 position="8000,-150,150"/>
     507            <Model mesh="cube.mesh" scale=1.5 position="10000,-200,200"/>
     508            <Model mesh="cube.mesh" scale=1.5 position="13000,200,400"/>
     509            <Model mesh="cube.mesh" scale=1.5 position="15000,0,0"/>
     510            <Model mesh="cube.mesh" scale=1.5 position="18000,150,-150"/>
     511            <Model mesh="cube.mesh" scale=1.5 position="21000,200,-120"/>
     512            <Model mesh="cube.mesh" scale=1.5 position="24000,-150,-80"/>
     513            <Model mesh="cube.mesh" scale=1.5 position="27000,-200,0"/>
     514            <Model mesh="cube.mesh" scale=1.5 position="30000,-300,900"/>
     515            <Model mesh="cube.mesh" scale=1.5 position="33000,600,60"/>
     516            <Model mesh="cube.mesh" scale=1.5 position="35000,120,20"/>
     517            <Model mesh="cube.mesh" scale=1.5 position="38000,-200,0"/>
     518            <Model mesh="cube.mesh" scale=1.5 position="41000,30,-50"/>
     519            <Model mesh="cube.mesh" scale=1.5 position="44000,90,0"/>
     520            <Model mesh="cube.mesh" scale=1.5 position="47000,120,30"/>
     521            <Model mesh="cube.mesh" scale=1.5 position="50000,0,100"/>
     522            <Model mesh="cube.mesh" scale=1.5 position="53000,0,0"/>
     523
     524           
     525
     526                </gpspoints>
     527        </ArrowController>
     528      </controller>
     529    </Arrow>
    494530
    495531
  • code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc

    r11841 r11857  
    119119
    120120        this->spawnPlayersIfRequested();
     121        this->countdown_mode=true;
    121122        this->cantMove_ = true;
    122123        //players are unable to move while countdown is running
     
    145146        ChatManager::message(message);
    146147       
    147        
    148         /*for(int i=10; i>0;i=i-1){
    149             startmessage(i);
    150         }*/
    151 
    152 
    153         //after 11 seconds , countdownFinished function is called to activate bots` engines
    154         //Timer* countdownTimer = new Timer();
    155         //countdownTimer->setTimer(11, false, createExecutor(createFunctor(&SpaceRace::countdownFinished, this)));
    156 
    157         /*
    158         while(countdownTimer->getRemainingTime()!=0){
    159             if(countdownTimer->getRemainingTime()==1){
    160                 startmessage(1);
    161             }
    162         }*/
    163        
    164 
    165 
    166 
    167        
    168 
    169        
    170         /*unsigned long long float time_notification=countdownTimer.getRealMicroSeconds();
    171         while(this->bTimeIsUp_==false){
    172 
    173         std::ostream stream;
    174         stream<<time_notification;
    175         std::string chat_notification(stream.str());
    176         this->getGametypeInfo()->sendAnnounceMessage(chat_notification);
    177         ChatManager::message(chat_notification);
    178 
    179         }*/
    180 
    181        
    182     }
    183 
    184    
    185 
     148
     149
     150       
     151    }
     152
     153    // Counter in the beginning of the game
    186154    void SpaceRace::tick(float dt) {
    187155        SUPER(SpaceRace, tick, dt);
    188         this->time_passed -= dt;
    189 
     156       
     157        //countdown_mode is set true,when spawnIfRequested is called
    190158        if (countdown_mode) {
     159            //10 seconds will be counted
     160            this->time_passed -= dt;
    191161
    192162            //orxout() << "time: " <<(int) time_passed << "s" << endl;
     163
    193164            std::string message=std::to_string((int)time_passed);
    194165            this->getGametypeInfo()->sendAnnounceMessage(message);
    195166            if (time_passed <= 1) {
     167
    196168                this->countdownFinished();
    197169                this->countdown_mode = false;
     
    210182
    211183    }
    212 
    213184
    214185    void SpaceRace::end()
  • code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.h

    r11841 r11857  
    8686            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator) override;
    8787            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator) override;
    88             bool countdown_mode = true;
    89             float time_passed = 11.0f;
     88            bool countdown_mode = false;
     89            float time_passed = 4.0f;
    9090
    9191        private:
Note: See TracChangeset for help on using the changeset viewer.