Changeset 1403


Ignore:
Timestamp:
09/18/06 02:18:37 (18 years ago)
Author:
giegl
Message:

GTPD - Jungle Rumble - GLOBAL_player_freezeQ WIP

Location:
GTP/trunk/App/Games/Jungle_Rumble
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Games/Jungle_Rumble/bin/config.xml

    r1398 r1403  
    33        <width>1024</width> 
    44        <height>768</height> 
    5         <fullscreen>1</fullscreen> <!-- 1 = TRUE, 0 = FALSE --> 
     5        <fullscreen>0</fullscreen> <!-- 1 = TRUE, 0 = FALSE --> 
    66        <cubemapsize>512</cubemapsize> <!-- 512, 1024, 2048, ... - current ATI cards have problems with size above 512 --> 
    77        <physxdebug>0</physxdebug>   <!-- 1 = TRUE, 0 = FALSE --> 
  • GTP/trunk/App/Games/Jungle_Rumble/src/GameManager.cpp

    r1399 r1403  
    1414 
    1515bool GLOBAL_display_help_screenQ = false; 
     16bool GLOBAL_player_freezeQ = false; 
    1617 
    1718 
     
    148149                                case VK_F7: 
    149150                                        //this->gs.getHUD()->displayLose(3, 0.01f); 
     151                                        GLOBAL_player_freezeQ = !GLOBAL_player_freezeQ; 
    150152                                        break; 
    151153                                case VK_F8: 
  • GTP/trunk/App/Games/Jungle_Rumble/src/GameScene.cpp

    r1401 r1403  
    2323#define M_PI 3.1415 
    2424 
     25extern bool GLOBAL_player_freezeQ; 
     26 
    2527GameScene::GameScene(void) : Scene() 
    2628{ 
     
    4749        this->currentlypaused = false; 
    4850        this->preparepaused = false; 
     51 
     52        this->ignoreKeys = false; 
    4953} 
    5054 
     
    121125 
    122126void GameScene::initScene(GameManager &_manager) { 
     127        this->ignoreKeys = false; 
    123128        this->resultVisible = false; 
    124129        this->won = false; 
     
    757762 
    758763        //Update Player instructions 
    759         if(this->keyDown['W']) player->accelerate(); 
    760         if(this->keyDown['S']) player->stop(); 
    761         if(this->keyDown['A']) player->toLeft(); 
    762         if(this->keyDown['D']) player->toRight(); 
     764        if(!ignoreKeys) { 
     765                if(this->keyDown['W']) player->accelerate(); 
     766                if(this->keyDown['S']) player->stop(); 
     767                if(this->keyDown['A']) player->toLeft(); 
     768                if(this->keyDown['D']) player->toRight(); 
     769        } 
    763770 
    764771        //Set active Weapons 
     
    983990                        this->recalcTransformations = false; 
    984991                } 
     992                if(this->won && this->resultShowingTimer<=5.75f) { 
     993                        //this->player->resetValues(); 
     994                        GLOBAL_player_freezeQ = true; 
     995                        this->ignoreKeys = true; 
     996                } 
    985997                if(this->resultShowingTimer<=0) { 
    986998                        this->manager->switchToMenueScene(); 
  • GTP/trunk/App/Games/Jungle_Rumble/src/GameScene.h

    r1382 r1403  
    176176        float resultShowingTimer; 
    177177 
    178          
     178        bool ignoreKeys; 
    179179}; 
  • GTP/trunk/App/Games/Jungle_Rumble/src/Player.cpp

    r1401 r1403  
    390390} 
    391391 
     392 
    392393void Player::update(float dt) { 
     394 
    393395        if(this->sleepCounter++<10) { 
    394396                if(this->sleepCounter==2) { 
     
    478480        } 
    479481} 
     482 
    480483 
    481484void Player::updateDrivingPlayer(float dt) { 
  • GTP/trunk/App/Games/Jungle_Rumble/src/UserPlayer.cpp

    r1378 r1403  
    6666        } 
    6767}*/ 
     68 
     69extern bool GLOBAL_player_freezeQ; 
     70 
     71void UserPlayer::update(float dt) 
     72{ 
     73        if(GLOBAL_player_freezeQ) {  
     74                this->setBehaveAs(Node::KINEMATIC); 
     75                return;  
     76        } 
     77 
     78        Player::update(dt); 
     79} 
  • GTP/trunk/App/Games/Jungle_Rumble/src/UserPlayer.h

    r1378 r1403  
    1717        /*void initWin(); 
    1818        void initLose(); 
     19        */ 
     20        virtual void update(float dt); 
    1921 
    20         virtual void update(float dt);*/ 
    2122protected: 
    2223        float finalTimer; 
Note: See TracChangeset for help on using the changeset viewer.