Changeset 10557 for code/branches/core7/src/modules/dodgerace
- Timestamp:
- Aug 29, 2015, 6:18:30 PM (9 years ago)
- Location:
- code/branches/core7/src/modules/dodgerace
- Files:
-
- 4 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;
Note: See TracChangeset
for help on using the changeset viewer.