Changeset 12354
- Timestamp:
- May 9, 2019, 2:10:31 PM (6 years ago)
- Location:
- code/branches/Boxhead_FS19
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Boxhead_FS19/data/levels/Hover.oxw
r12299 r12354 88 88 </templates> 89 89 <controller> 90 <WaypointPatrolController alertnessradius=2000 team=1 >90 <WaypointPatrolController alertnessradius=2000 attackradius=1 team=1 > 91 91 <waypoints> 92 92 <Model mesh="cube.mesh" scale=0 position="15500,15500,15500" /> … … 97 97 98 98 </controller> 99 </SpaceShip> 99 </SpaceShip> 100 100 101 101 102 </Scene> -
code/branches/Boxhead_FS19/src/modules/hover/Hover.cc
r12267 r12354 36 36 #include "HoverOrigin.h" 37 37 #include "HoverWall.h" 38 #include "HoverFlag.h" 38 39 39 #include "MazeGenerator.h" 40 40 #include "core/CoreIncludes.h" … … 51 51 52 52 this->origin_ = nullptr; 53 this->numberOfFlags_ = 1;54 53 this->firstTick_ = true; 55 54 … … 97 96 98 97 //Generate 5 flags randomly 99 for ( int i = 0; i < 5; i++ ) 100 { 101 HoverFlag* flag = new HoverFlag(origin_->getContext()); 102 flag->init(rand()%numCells, rand()%numCells, cellSize); 103 flags_.push_back(flag); 104 } 98 // for ( int i = 0; i < 5; i++ ) 99 // { 100 // HoverFlag* zombieship = new SpaceShip(origin_->getContext()); 101 // flag->init(rand()%numCells, rand()%numCells, cellSize); 102 // flags_.push_back(flag); 103 // } 104 105 105 106 106 107 }//firsttick end 107 108 108 109 // Check if ship collided with one of the flags 109 for ( unsigned int i = 0; i < flags_.size(); i++ ){110 if(flags_[i]->getCollided()){111 flags_[i]->destroyLater();112 flags_.erase (flags_.begin()+i);113 }114 }115 numberOfFlags_ = flags_.size();110 // for ( unsigned int i = 0; i < flags_.size(); i++ ){ 111 // if(flags_[i]->getCollided()){ 112 // flags_[i]->destroyLater(); 113 // flags_.erase (flags_.begin()+i); 114 // } 115 // } 116 // numberOfFlags_ = flags_.size(); 116 117 } 117 118 }
Note: See TracChangeset
for help on using the changeset viewer.