Changeset 9837 for code/branches/invaders/src/modules
- Timestamp:
- Dec 2, 2013, 2:08:46 PM (11 years ago)
- Location:
- code/branches/invaders/src/modules/invader
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/invaders/src/modules/invader/Invader.cc
r9829 r9837 87 87 return; 88 88 89 InvaderEnemy* newPawn = new InvaderEnemy(this->center_->getContext()); 90 newPawn->addTemplate("enemyinvader"); 91 92 newPawn->setPosition(player->getPosition() + Vector3(1000, 0, 0)); // BUG: 89 for (int i = 0; i < level; i++) 90 { 91 SmartPtr<InvaderEnemy> newPawn = new InvaderEnemy(this->center_->getContext()); 92 newPawn->addTemplate("enemyinvader"); 93 newPawn->setPosition(player->getPosition() + Vector3(500 + 100 * i, 0, 0)); 94 } 93 95 } 94 96 -
code/branches/invaders/src/modules/invader/Invader.h
r9829 r9837 67 67 int getPoints(){return this->point;} 68 68 69 void costLife(){lives--; if (lives == 0) orxout() << "end<<<<<<<<<<<<<<<<<" << endl;};69 void costLife(){lives--; if (lives <= 0) end();}; 70 70 void levelUp(){level++;} 71 71 void addPoints(int numPoints){point += numPoints * multiplier; b_combo = true;} -
code/branches/invaders/src/modules/invader/InvaderEnemy.cc
r9829 r9837 48 48 void InvaderEnemy::tick(float dt) 49 49 { 50 setVelocity(Vector3(500 ,0, 0)); 50 51 SUPER(InvaderEnemy, tick, dt); 51 52 } … … 53 54 inline bool InvaderEnemy::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 54 55 { 55 orxout() << "sadsadasfasf" << endl;56 setVelocity(Vector3(900,0,0)); 56 57 removeHealth(2000); 57 setVelocity(Vector3(0,0,1000));58 58 return false; 59 59 }
Note: See TracChangeset
for help on using the changeset viewer.