Changeset 10557 for code/branches/core7/src/modules/invader
- Timestamp:
- Aug 29, 2015, 6:18:30 PM (9 years ago)
- Location:
- code/branches/core7/src/modules/invader
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/modules/invader/Invader.cc
r9961 r10557 87 87 for (int i = 0; i < 7; i++) 88 88 { 89 WeakPtr<BigExplosion>chunk = new BigExplosion(this->center_->getContext());89 BigExplosion* chunk = new BigExplosion(this->center_->getContext()); 90 90 chunk->setPosition(Vector3(600, 0, 100.f * i - 300)); 91 91 chunk->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() … … 99 99 } 100 100 101 WeakPtr<InvaderShip>Invader::getPlayer()101 InvaderShip* Invader::getPlayer() 102 102 { 103 103 if (player == NULL) … … 116 116 for (int i = 0; i < (3*log10(static_cast<double>(level)) + 1); i++) 117 117 { 118 WeakPtr<InvaderEnemy>newPawn;118 InvaderEnemy* newPawn; 119 119 if (rand() % 42/(1 + level*level) == 0) 120 120 { -
code/branches/core7/src/modules/invader/Invader.h
r9943 r10557 78 78 private: 79 79 void toggleShowLevel(){bShowLevel = !bShowLevel;} 80 WeakPtr<InvaderShip>getPlayer();80 InvaderShip* getPlayer(); 81 81 WeakPtr<InvaderCenterPoint> center_; 82 82 WeakPtr<InvaderShip> player; -
code/branches/core7/src/modules/invader/InvaderEnemy.cc
r9961 r10557 69 69 } 70 70 71 WeakPtr<Invader>InvaderEnemy::getGame()71 Invader* InvaderEnemy::getGame() 72 72 { 73 73 if (game == NULL) -
code/branches/core7/src/modules/invader/InvaderEnemy.h
r9943 r10557 49 49 virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 50 50 virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator); 51 virtual void setPlayer( WeakPtr<InvaderShip>player){this->player = player;}51 virtual void setPlayer(InvaderShip* player){this->player = player;} 52 52 53 53 int level; 54 54 protected: 55 WeakPtr<Invader>getGame();55 Invader* getGame(); 56 56 WeakPtr<Invader> game; 57 57 WeakPtr<InvaderShip> player; -
code/branches/core7/src/modules/invader/InvaderShip.cc
r9943 r10557 91 91 92 92 // Camera 93 WeakPtr<Camera>camera = this->getCamera();93 Camera* camera = this->getCamera(); 94 94 if (camera != NULL) 95 95 { … … 142 142 { 143 143 // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint; 144 WeakPtr<InvaderEnemy>enemy = orxonox_cast<InvaderEnemy*>(otherObject);145 WeakPtr<Projectile>shot = orxonox_cast<Projectile*>(otherObject);144 InvaderEnemy* enemy = orxonox_cast<InvaderEnemy*>(otherObject); 145 Projectile* shot = orxonox_cast<Projectile*>(otherObject); 146 146 // ensure that this gets only called once per enemy. 147 147 if (enemy != NULL && lastEnemy != enemy) … … 171 171 } 172 172 173 WeakPtr<Invader>InvaderShip::getGame()173 Invader* InvaderShip::getGame() 174 174 { 175 175 if (game == NULL) -
code/branches/core7/src/modules/invader/InvaderShip.h
r9943 r10557 70 70 virtual void death(); 71 71 private: 72 WeakPtr<Invader>getGame();72 Invader* getGame(); 73 73 WeakPtr<Invader> game; 74 74 Camera* camera; -
code/branches/core7/src/modules/invader/InvaderWeapon.cc
r10216 r10557 68 68 // Create the projectile.projectile 69 69 projectile = new Projectile(this->getContext()); 70 WeakPtr<Model>model = new Model(projectile->getContext());70 Model* model = new Model(projectile->getContext()); 71 71 model->setMeshSource(mesh_); 72 72 model->setCastShadows(false);
Note: See TracChangeset
for help on using the changeset viewer.