Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 30, 2011, 9:55:38 AM (14 years ago)
Author:
dafrick
Message:

Make the camera position stay the same between differnet stones in Tetris.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/modules/tetris/Tetris.cc

    r8661 r8680  
    233233        if(this->player_ == NULL)
    234234            return;
    235        
     235
     236        unsigned int cameraIndex = 0;
    236237        if(this->activeStone_ != NULL)
     238        {
     239            // Get camera settings
     240            cameraIndex = this->activeStone_->getCurrentCameraIndex();
    237241            this->player_->stopControl();
     242        }
    238243       
    239244        // Make the last stone to be created the active stone.
     
    242247        this->player_->startControl(this->activeStone_);
    243248        this->activeStone_->setVelocity(0.0f, -this->center_->getStoneSpeed(), 0.0f);
     249        this->activeStone_->setCameraPosition(cameraIndex);
    244250    }
    245251
Note: See TracChangeset for help on using the changeset viewer.