Changeset 9837 for code/branches/invaders/src
- Timestamp:
- Dec 2, 2013, 2:08:46 PM (11 years ago)
- Location:
- code/branches/invaders/src
- Files:
-
- 6 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 } -
code/branches/invaders/src/orxonox/worldentities/BigExplosion.cc
r9667 r9837 43 43 RegisterClass(BigExplosion); 44 44 45 BigExplosion::BigExplosion(Context* context) : StaticEntity(context)45 BigExplosion::BigExplosion(Context* context) : MobileEntity(context) 46 46 { 47 47 RegisterObject(BigExplosion); … … 100 100 this->debris4_->setSyncMode(0); 101 101 102 this->explosion_ = new StaticEntity(this->getContext());102 this->explosion_ = new MobileEntity(this->getContext()); 103 103 this->explosion_->setSyncMode(0); 104 104 -
code/branches/invaders/src/orxonox/worldentities/BigExplosion.h
r9667 r9837 22 22 * Author: 23 23 * Benjamin de Capitani 24 * Co-authors: 24 * Co-authors:§ 25 25 * ... 26 26 * … … 33 33 34 34 #include "tools/Timer.h" 35 #include " StaticEntity.h"35 #include "MobileEntity.h" 36 36 37 37 namespace orxonox 38 38 { 39 class _OrxonoxExport BigExplosion : public StaticEntity39 class _OrxonoxExport BigExplosion : public MobileEntity 40 40 { 41 41 public: … … 60 60 bool bStop_; 61 61 62 StaticEntity* explosion_;62 MobileEntity* explosion_; 63 63 64 64 MovableEntity* debrisEntity1_; -
code/branches/invaders/src/orxonox/worldentities/pawns/Pawn.cc
r9667 r9837 367 367 BigExplosion* chunk = new BigExplosion(this->getContext()); 368 368 chunk->setPosition(this->getPosition()); 369 chunk->setVelocity(this->getVelocity()); 369 370 370 371 }
Note: See TracChangeset
for help on using the changeset viewer.