Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 29, 2012, 11:08:26 AM (12 years ago)
Author:
mentzerf
Message:

+ Added console command "addTower" to later spawn in towers. Now only outputs to console
+ Added centerpoint variable, is being set by TowerDefenseCenterpoint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/newlevel2012/src/modules/towerdefense/TowerDefenseCenterpoint.cc

    r9112 r9136  
    5151        RegisterObject(TowerDefenseCenterpoint);
    5252
     53               
     54               
    5355        this->width_ = 10;
    5456        this->height_ = 11;
     
    8991    void TowerDefenseCenterpoint::checkGametype()
    9092    {
    91         if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
     93                if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
    9294        {
    93             //TowerDefense* TowerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
    94             //TowerDefenseGametype->setCenterpoint(this);
     95                        // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
     96            TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
     97            towerDefenseGametype->setCenterpoint(this);
    9598        }
    9699    }
Note: See TracChangeset for help on using the changeset viewer.