Changeset 1896 in orxonox.OLD for orxonox/trunk/core/player.cc
- Timestamp:
- May 20, 2004, 1:01:57 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/player.cc
r1883 r1896 20 20 #include <iostream> 21 21 22 22 23 using namespace std; 23 24 … … 25 26 Player::Player () { 26 27 xCor = yCor = zCor = 0; 28 shootLaser = new ShootLaser; 27 29 } 28 30 29 30 31 Player::~Player () {} 31 Player::~Player () 32 { 33 //delete shootLaser; 34 } 32 35 33 36 … … 37 40 } 38 41 39 void Player::getPosition(float* x, float* y, float* z) 42 43 void Player::getPosition(float* x, float* y, float* z) 40 44 { 41 45 *x = xCor; *y = yCor; *z = zCor; … … 44 48 void Player::goX(float x) 45 49 { 50 //cout << "Player::goX" << endl; 46 51 xCor += x; 47 52 } … … 58 63 } 59 64 60 void Player::shoot(int n) { 65 void Player::shoot(int n) 66 { 67 shootLaser->addShoot(xCor, yCor, zCor); 68 //cout << "Player::shoot" << endl; 61 69 } 62 70 … … 67 75 void Player::drawPlayer(void) 68 76 { 69 //cout << "Player::drawPlayer()" << endl;70 //glColor3f(0.0, 0.9, 0.7);71 //glRectf(-0.5 + yCor, -0.5 + xCor, 0.5 + yCor, 2.0 + xCor);72 73 77 glPushMatrix(); 78 glTranslatef(xCor, yCor, 3.0); 74 79 glScalef(1.0, 3.0, 1.0); 75 glTranslatef(xCor, yCor, 3.0);76 80 glutWireCube(1.0); 77 81 glPopMatrix(); 82 /* draw all the shoots additionaly */ 83 shootLaser->drawShoot(); 84 //cout << "Player::drawPlayer" << endl; 85 } 78 86 79 87 80 //cout << "x: " << xCor << " y: " << yCor << endl; 81 } 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
Note: See TracChangeset
for help on using the changeset viewer.