Changeset 12165 for code/branches/TowerDefense_HS18/src/modules
- Timestamp:
- Dec 7, 2018, 10:18:21 AM (6 years ago)
- Location:
- code/branches/TowerDefense_HS18/src/modules/towerdefense
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/TowerDefense_HS18/src/modules/towerdefense/CMakeLists.txt
r12125 r12165 11 11 TDCoordinate.cc 12 12 TowerDefenseController.cc 13 TowerDefenseRangeViewer.cc 13 14 ) 14 15 -
code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.cc
r12153 r12165 76 76 #include "TowerDefenseCenterpoint.h" 77 77 #include "worldentities/SpawnPoint.h" 78 #include "worldentities/StaticEntity.h" 78 79 #include "TowerDefenseController.h" //muss ich noch in den richtigen Ordner verschieben 79 80 #include "graphics/Model.h" … … 82 83 #include "core/CoreIncludes.h" 83 84 #include "Highscore.h" 85 #include "util/Output.h" 86 #include "TowerDefenseRangeViewer.h" 87 84 88 85 89 namespace orxonox … … 92 96 93 97 selecter = nullptr; 98 rangeViewer = nullptr; 94 99 this->player_ = nullptr; 95 100 this->setHUDTemplate("TowerDefenseHUD"); … … 124 129 selecter = new TowerDefenseSelecter(this->center_->getContext()); 125 130 } 131 if(rangeViewer == nullptr){ 132 rangeViewer = new TowerDefenseRangeViewer(this->center_->getContext()); 133 } 126 134 selecter->addTemplate(center_->getSelecterTemplate()); 135 rangeViewer->addTemplate("therangeviewer"); 136 rangeViewer->setPosition(-10000,0,-500); 127 137 center_->attach(selecter); 138 center_->attach(rangeViewer); 128 139 } 129 140 else // If no centerpoint was specified, an error is thrown and the level is exited. … … 136 147 137 148 createFields(); 149 138 150 TeamDeathmatch::start(); 139 151 … … 282 294 timeUntilNextWave_ -= dt; 283 295 timeSinceLastSpawn_ += dt; 296 297 if(selecter != nullptr && getField(selecter->selectedPos_)->canUpgrade() == true ){ 298 rangeViewer->setPosition(((selecter->selectedPos_->GetX())-8)*100, ((selecter->selectedPos_->GetY())-8)*100, 200); 299 } else { 300 rangeViewer->setPosition(-10000,0,-500); 301 } 284 302 285 303 //build/upgrade tower at selecter position -
code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.h
r12125 r12165 38 38 #include "util/Output.h" 39 39 #include "TowerDefenseField.h" 40 #include "TowerDefenseRangeViewer.h" 40 41 41 42 namespace orxonox … … 76 77 virtual TDCoordinate* getNextStreetCoord(TDCoordinate*); 77 78 78 TowerDefenseSelecter* selecter; 79 TowerDefenseSelecter* selecter; 80 TowerDefenseRangeViewer* rangeViewer; 79 81 80 82 private: -
code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefenseField.cc
r11071 r12165 1 1 2 /* 2 3 * ORXONOX - the hottest 3D action shooter ever to exist … … 282 283 } 283 284 } 285 284 286 } 285 287 } -
code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefensePrereqs.h
r10258 r12165 68 68 69 69 class TowerDefenseTower; 70 70 class TowerDefenseRangeViewer; 71 71 class TowerDefenseCenterpoint; 72 72 class TowerDefenseHUDController;
Note: See TracChangeset
for help on using the changeset viewer.