- Timestamp:
- Nov 19, 2014, 4:20:18 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.cc
r10126 r10132 34 34 void TowerDefenseEnemy::addWaypoint(TDCoordinate* coord) 35 35 { 36 orxout() << "test4" << endl;37 36 this->Waypointsvector_.push_back(coord); 38 orxout() << "test5" << endl;39 37 } 38 39 40 void TowerDefenseEnemy::tick(float dt) 41 { 42 SUPER(TowerDefenseEnemy, tick, dt); 43 44 //ArtificialController* controller = (ArtificialController*)this->getController(); 45 Vector3 ship = this->getRVWorldPosition(); 46 Vector3* endpoint = new Vector3(500, 700, 150); 47 48 float distance = ship.distance(*endpoint); 49 50 orxout() << "distance" << distance << endl; 51 if(distance <50){ 52 orxout() << "ENEMY KILLED!!!!" << endl; 53 this->destroy(); } 54 } 55 40 56 /* 41 57 void TowerDefenseEnemy::popWaypoint()
Note: See TracChangeset
for help on using the changeset viewer.