Changeset 9137 for code/branches/newlevel2012
- Timestamp:
- Apr 29, 2012, 11:17:38 AM (13 years ago)
- Location:
- code/branches/newlevel2012
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/newlevel2012/data/levels/towerDefense.oxw
r9134 r9137 48 48 <Tower> 49 49 <attached> 50 <Model position="15,0,0" mesh="c rate.mesh" scale=1 />50 <Model position="15,0,0" mesh="cube_green.mesh" scale=1 /> 51 51 </attached> 52 52 </Tower> -
code/branches/newlevel2012/src/modules/towerdefense/Tower.h
r9135 r9137 24 24 virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down. 25 25 26 27 26 void setGame(TowerDefense* towerdefense) 27 { assert(towerdefense); game_ = towerdefense; } 28 private: 29 TowerDefense* game_; 28 30 }; 29 31 } -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc
r9136 r9137 56 56 57 57 #include "TowerDefense.h" 58 #include "Tower.h" 59 #include "TowerDefenseCenterpoint.h" 60 58 61 #include "worldentities/SpawnPoint.h" 59 62 #include "worldentities/pawns/Pawn.h" … … 110 113 void TowerDefense::addTower(int x, int y) 111 114 { 112 orxout()<< "Should add tower at (" << x << "," << y << ")" << endl;113 114 115 if (x > 16 || y > 16) 115 116 { … … 118 119 } 119 120 121 orxout()<< "Should add tower at (" << x << "," << y << ")" << endl; 122 123 Tower* newTower = new Tower(this->center_); 124 newTower->addTemplate(this->center_->getTowerTemplate()); 125 126 this->center_->attach(newTower); 127 128 newTower->setPosition(0,0,0); 129 newTower->setGame(this); 120 130 121 131
Note: See TracChangeset
for help on using the changeset viewer.