Changeset 2036 in orxonox.OLD for orxonox/trunk/src/player.cc
- Timestamp:
- Jun 27, 2004, 7:48:44 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/player.cc
r1957 r2036 16 16 */ 17 17 18 #include <iostream> 19 #include <stdlib.h> 20 #include <GL/glut.h> 21 22 #include "shoot_laser.h" 23 #include "shoot_rocket.h" 24 #include "data_tank.h" 18 25 19 26 #include "player.h" 20 #include <iostream>21 #include <stdlib.h>22 23 27 24 28 using namespace std; 25 29 26 30 27 Player::Player () { 28 // cout << "Player::Player" << endl; 31 Player::Player() 32 : WorldEntity() { 33 //cout << "Player::Player" << endl; 29 34 xCor = yCor = zCor = 0; 30 35 shootLaser = new ShootLaser; … … 58 63 void Player::goX(float x) 59 64 { 60 //cout << "Player::goX" << endl;61 65 xCor += x; 62 66 } … … 73 77 } 74 78 79 80 75 81 void Player::shoot(int n) 76 82 { 83 77 84 // if (shootLaser->inhibitor++ <= 100) 78 79 80 81 82 83 84 85 shootLaser->addShoot(xCor, yCor, zCor); 86 // else if (shootLaser->inhibitor++ <= 200) 87 shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0); 88 // else if (shootLaser->inhibitor++ <= 300) 89 shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0); 90 // else 91 shootLaser->inhibitor =0; 85 92 86 87 88 89 90 91 92 93 //shootRocket->inhibitor =0;94 93 // if (shootRocket->inhibitor++ >=80) 94 { 95 shootRocket->addBackParable(xCor, yCor, zCor); 96 shootRocket->addSideAcc(xCor, yCor, zCor, RIGHT); 97 shootRocket->addSideAcc(xCor, yCor, zCor, LEFT); 98 shootRocket->addRotater(xCor, yCor, zCor); 99 // if (shootRocket->inhibitor >=90) 100 // shootRocket->inhibitor =0; 101 } 95 102 //cout << "Player::shoot" << endl; 103 104 /* 105 shootLaser->addShoot(xCor, yCor, zCor); 106 shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0); 107 shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0); 108 //shootRocket->addShoot(xCor, yCor, zCor); 109 //cout << "Player::shoot" << endl; 110 */ 96 111 } 97 112 … … 100 115 101 116 102 void Player:: drawPlayer(void)117 void Player::paint() 103 118 { 119 //cout << "Player::drawPlayer" << endl; 104 120 glPushMatrix(); 105 121 glTranslatef(xCor, yCor, 3.0); … … 110 126 shootLaser->drawShoot(); 111 127 shootRocket->drawShoot(); 112 //cout << "Player::drawPlayer " << endl;128 //cout << "Player::drawPlayer, end" << endl; 113 129 } 114 130
Note: See TracChangeset
for help on using the changeset viewer.