Changeset 9175 for code/branches/newlevel2012/src
- Timestamp:
- May 11, 2012, 4:03:28 PM (13 years ago)
- Location:
- code/branches/newlevel2012/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/newlevel2012/src/modules/towerdefense/Tower.cc
r9161 r9175 22 22 Constructor. Registers and initializes the object. 23 23 */ 24 Tower::Tower(BaseObject* creator) : ControllableEntity(creator)24 Tower::Tower(BaseObject* creator) : SpaceShip(creator) 25 25 { 26 26 RegisterObject(Tower); 27 28 this->setCollisionType(WorldEntity::Dynamic); 29 30 31 27 32 /* 28 33 this->size_ = 10.0f; -
code/branches/newlevel2012/src/modules/towerdefense/Tower.h
r9141 r9175 19 19 20 20 #include "towerdefense/TowerDefensePrereqs.h" 21 #include "worldentities/ ControllableEntity.h"21 #include "worldentities/pawns/SpaceShip.h" 22 22 23 23 namespace orxonox 24 24 { 25 class _OrxonoxExport Tower : public ControllableEntity25 class _OrxonoxExport Tower : public SpaceShip 26 26 { 27 27 public: -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc
r9172 r9175 118 118 void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint) 119 119 { 120 orxout() << "Centerpoint now setting..." << endl; 121 this->center_ = centerpoint; 120 122 orxout() << "Centerpoint now set..." << endl; 121 this->center_ = centerpoint;122 123 } 123 124 … … 191 192 Tower* newTower = new Tower(this->center_); 192 193 newTower->addTemplate(this->center_->getTowerTemplate()); 193 194 this->center_->attach(newTower);195 194 195 //this->center_->attach(newTower); 196 196 197 newTower->setPosition((x-8) * tileScale, (y-8) * tileScale, 100); 197 198 newTower->setGame(this); 198 199 199 //TODO: Save the Tower in a Vector. I would suggest std::vector< std::vector<Tower*> > towers_ as a protected member variable; 200 200 -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefenseCenterpoint.cc
r9154 r9175 47 47 Constructor. Registers and initializes the object and checks whether the gametype is actually TowerDefense. 48 48 */ 49 TowerDefenseCenterpoint::TowerDefenseCenterpoint(BaseObject* creator) : StaticEntity(creator)49 TowerDefenseCenterpoint::TowerDefenseCenterpoint(BaseObject* creator) : MobileEntity(creator) 50 50 { 51 51 RegisterObject(TowerDefenseCenterpoint); … … 55 55 this->towerTemplate_ = ""; 56 56 57 //this->setCollisionType(Static); 58 57 59 this->checkGametype(); 60 58 61 } 59 62 -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefenseCenterpoint.h
r9154 r9175 42 42 #include <util/Math.h> 43 43 44 #include "worldentities/ StaticEntity.h"44 #include "worldentities/MobileEntity.h" 45 45 46 46 namespace orxonox 47 47 { 48 class _TowerDefenseExport TowerDefenseCenterpoint : public StaticEntity48 class _TowerDefenseExport TowerDefenseCenterpoint : public MobileEntity 49 49 { 50 50 public: -
code/branches/newlevel2012/src/orxonox/worldentities/WorldEntity.cc
r8858 r9175 379 379 if (!object->notifyBeingAttached(this)) 380 380 return; 381 382 381 this->attachNode(object->node_); 383 382 this->children_.insert(object);
Note: See TracChangeset
for help on using the changeset viewer.