Changeset 10557 for code/branches/core7/src/modules
- Timestamp:
- Aug 29, 2015, 6:18:30 PM (9 years ago)
- Location:
- code/branches/core7/src/modules
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/modules/dodgerace/DodgeRace.cc
r10357 r10557 75 75 for (int i = 0; i < 7; i++) 76 76 { 77 WeakPtr<BigExplosion>chunk = new BigExplosion(this->center_->getContext());77 BigExplosion* chunk = new BigExplosion(this->center_->getContext()); 78 78 chunk->setPosition(Vector3(600, 0, 100.f * i - 300)); 79 79 chunk->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() … … 91 91 if (getPlayer() != NULL) 92 92 { 93 //WeakPtr<DodgeRaceShip> ship = getPlayer();94 95 93 currentPosition = getPlayer()->getWorldPosition().x; 96 94 counter = counter + (currentPosition - lastPosition); … … 113 111 for(int i = 0; i<6; i++) 114 112 { 115 WeakPtr<DodgeRaceCube>cube = new DodgeRaceCube(this->center_->getContext());113 DodgeRaceCube* cube = new DodgeRaceCube(this->center_->getContext()); 116 114 cubeList.push_back(cube); 117 115 switch(pattern) … … 138 136 } 139 137 140 WeakPtr<DodgeRaceShip>DodgeRace::getPlayer()138 DodgeRaceShip* DodgeRace::getPlayer() 141 139 { 142 140 if (player == NULL) -
code/branches/core7/src/modules/dodgerace/DodgeRace.h
r10357 r10557 105 105 Timer endGameTimer; 106 106 107 WeakPtr<DodgeRaceShip>getPlayer();107 DodgeRaceShip* getPlayer(); 108 108 WeakPtr<DodgeRaceShip> player; 109 109 std::vector<DodgeRaceCube*> cubeList; -
code/branches/core7/src/modules/dodgerace/DodgeRaceShip.cc
r10357 r10557 90 90 91 91 // Camera 92 WeakPtr<Camera>camera = this->getCamera();92 Camera* camera = this->getCamera(); 93 93 if (camera != NULL) 94 94 { … … 150 150 } 151 151 152 WeakPtr<DodgeRace>DodgeRaceShip::getGame()152 DodgeRace* DodgeRaceShip::getGame() 153 153 { 154 154 if (game == NULL) -
code/branches/core7/src/modules/dodgerace/DodgeRaceShip.h
r10357 r10557 78 78 private: 79 79 virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 80 WeakPtr<DodgeRace>getGame();80 DodgeRace* getGame(); 81 81 WeakPtr<DodgeRace> game; 82 82 WeakPtr<WorldEntity> lastEntity; -
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); -
code/branches/core7/src/modules/jump/JumpEnemy.cc
r10262 r10557 151 151 An array (of size 2) of weak pointers, to be set as the new bats. 152 152 */ 153 void JumpEnemy::setFigure( WeakPtr<JumpFigure>newFigure)153 void JumpEnemy::setFigure(JumpFigure* newFigure) 154 154 { 155 155 figure_ = newFigure; -
code/branches/core7/src/modules/jump/JumpEnemy.h
r10262 r10557 68 68 69 69 virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed); 70 void setFigure( WeakPtr<JumpFigure> bats);70 void setFigure(JumpFigure* newFigure); 71 71 virtual void touchFigure(); 72 72 bool dead_; -
code/branches/core7/src/modules/jump/JumpItem.cc
r10262 r10557 109 109 } 110 110 111 void JumpItem::setFigure( WeakPtr<JumpFigure>newFigure)111 void JumpItem::setFigure(JumpFigure* newFigure) 112 112 { 113 113 figure_ = newFigure; -
code/branches/core7/src/modules/jump/JumpItem.h
r10262 r10557 53 53 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 54 54 virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed); 55 virtual void setFigure( WeakPtr<JumpFigure> bats);55 virtual void setFigure(JumpFigure* newFigure); 56 56 virtual void touchFigure(); 57 57 -
code/branches/core7/src/modules/jump/JumpPlatform.cc
r10262 r10557 125 125 } 126 126 127 void JumpPlatform::setFigure( WeakPtr<JumpFigure>newFigure)127 void JumpPlatform::setFigure(JumpFigure* newFigure) 128 128 { 129 129 figure_ = newFigure; -
code/branches/core7/src/modules/jump/JumpPlatform.h
r10262 r10557 49 49 virtual void tick(float dt); 50 50 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 51 void setFigure( WeakPtr<JumpFigure> bats); //!< Set the bats for the ball.51 void setFigure(JumpFigure* newFigure); 52 52 virtual void touchFigure(); 53 53 -
code/branches/core7/src/modules/jump/JumpProjectile.cc
r10262 r10557 84 84 } 85 85 86 void JumpProjectile::setFigure( WeakPtr<JumpFigure>figure)86 void JumpProjectile::setFigure(JumpFigure* figure) 87 87 { 88 88 figure_ = figure; -
code/branches/core7/src/modules/jump/JumpProjectile.h
r10262 r10557 56 56 { return Vector2(this->fieldWidth_, this->fieldHeight_); } 57 57 58 void setFigure( WeakPtr<JumpFigure>figure);58 void setFigure(JumpFigure* figure); 59 59 60 60 protected: -
code/branches/core7/src/modules/objects/triggers/DistanceTrigger.cc
r9667 r10557 213 213 214 214 // Add the entity to the cache. 215 this->cache_ = WeakPtr<WorldEntity>(entity);215 this->cache_ = entity; 216 216 217 217 return true; -
code/branches/core7/src/modules/tetris/Tetris.h
r10555 r10557 69 69 70 70 PlayerInfo* getPlayer(void) const; //!< Get the player. 71 WeakPtr<TetrisCenterpoint>getCenterpoint(void)71 TetrisCenterpoint* getCenterpoint(void) 72 72 { return this->center_; } 73 73 -
code/branches/core7/src/modules/towerdefense/TowerDefenseEnemy.cc
r10258 r10557 49 49 } 50 50 51 WeakPtr<TowerDefense>TowerDefenseEnemy::getGame()51 TowerDefense* TowerDefenseEnemy::getGame() 52 52 { 53 53 if (game == NULL) -
code/branches/core7/src/modules/towerdefense/TowerDefenseEnemy.h
r10258 r10557 47 47 48 48 private: 49 WeakPtr<TowerDefense>getGame();49 TowerDefense* getGame(); 50 50 WeakPtr<TowerDefense> game; 51 51 TowerDefense* td;
Note: See TracChangeset
for help on using the changeset viewer.