- Timestamp:
- Dec 11, 2017, 4:06:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc
r11645 r11660 21 21 * 22 22 * Author: 23 * Florian Zinggeler23 * Viviane Yang 24 24 * Co-authors: 25 25 * ... … … 27 27 */ 28 28 29 /*TODO: orientation/direction of the ship must be defined 30 implement shoot function ->or switch it on? 31 switch off boosting particles in the back of the ship 29 /* TODO: 32 30 33 31 /** … … 54 52 this->height = 646; 55 53 56 timer.setTimer(3.5f, true, createExecutor(createFunctor(&Asteroids2DShip::showposition, this)));54 //timer.setTimer(3.5f, true, createExecutor(createFunctor(&Asteroids2DShip::showorientation, this))); 57 55 } 58 56 … … 64 62 } 65 63 64 //Same thing for orientation 65 void Asteroids2DShip::showorientation() 66 { 67 Quaternion ort = this->getOrientation(); 68 orxout() << "w = " << ort.w << " x = " << ort.x << " y = " << ort.y << "z = " << ort.z << endl; 69 } 70 66 71 void Asteroids2DShip::tick(float dt) 67 72 { … … 69 74 Vector3 pos = this->getPosition(); 70 75 71 // haelt ship innerhalb des Kamerafensters, kommt oben bzw seitlich wieder raus. Man spawnt in (0,0)76 //ensure that the ship stays in playing field 72 77 if(pos.x > width/2) pos.x = -width/2; 73 78 if(pos.x < -width/2) pos.x = width/2; … … 79 84 this->setPosition(pos); 80 85 81 //update level 86 82 87 83 88 //shoot? 89 } 90 91 void Asteroids2DShip::boost(bool bBoost) 92 { 93 isFireing = bBoost; 84 94 } 85 95 … … 88 98 if (getGame()) 89 99 getGame()->levelUp(); 90 }91 92 void Asteroids2DShip::boost(bool bBoost)93 {94 //getGame()->bEndGame = bBoost;95 100 } 96 101 … … 107 112 bImmune = true; 108 113 isimmune.setTimer(3.0f, false, createExecutor(createFunctor(&Asteroids2DShip::toggleImmune, this))); 109 orxout()<< "touched" << endl;110 114 } 111 115 return false;
Note: See TracChangeset
for help on using the changeset viewer.