4 Player::Player(Game
* agame
, Ponto pos
, Ponto speed
): Shooter(agame
, pos
, speed
) {
8 void Player::desenha() {
9 game
->desenhaMira(aim
);
13 void Player::collide(Thing
*b
) {
14 Shot
* shot
= dynamic_cast<Shot
*>(b
);
15 if (shot
&& shot
->firedBy
!= this) {
17 if (this->getPosition().x
< shot
->firedBy
->getPosition().x
)
21 addToAngle
= std::max(std::min(addToAngle
, PI
/2),-PI
/2);
29 void Player::drawEquipment() {
31 Ponto hip
= cintura();
32 Ponto leftfeet
= leftFeet();
33 Ponto rightfeet
= rightFeet();
34 glTranslatef(hip
.x
,hip
.y
,0);
35 glRotatef(bodyAngle
*180.0/PI
,0,0,1);
36 glTranslatef(0,-11-30,0); //cabeca
38 glRotatef(-bodyAngle
*180.0/PI
,0,0,1);