Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2012, 3:32:56 PM (13 years ago)
Author:
jo
Message:

Tetris contais almost the same features as before introducing bricks. Two bugs are still left. And the clear row feature has to be implemented.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pCuts/src/modules/tetris/TetrisBrick.cc

    r9085 r9086  
    177177        return NULL;
    178178    }
    179 
     179//TODO: refactor this function; is not needed if brickstones are added to Tetris::stones_ after collision.
    180180    bool TetrisBrick::contains(TetrisStone* stone)
    181181    {
     
    241241        this->setVelocity(0.0f, 0.0f, 0.0f);
    242242    }
     243
    243244    /**
    244245    @brief
     
    247248    void TetrisBrick::releaseStones(TetrisCenterpoint* center)
    248249    {
     250        assert(this->tetris_);
    249251        for(unsigned int i = 0; i < brickStones_.size(); i++)
    250252        {
    251             //this->brickStones_[i]->detachFromParent();
    252 
    253             //this->brickStones_[i]->detach(this);
    254             //this->brickStones_[i]->attach(center);
     253            this->brickStones_[i]->detachFromParent();
     254            this->brickStones_[i]->attachToParent(center);
     255            this->brickStones_[i]->setPosition(this->getPosition()+this->tetris_->rotateVector(this->brickStones_[i]->getPosition(),this->rotationCount_ ));
    255256        }
    256257
Note: See TracChangeset for help on using the changeset viewer.