4 Player::Player(Game
* agame
) {
8 game
->gravityManager
->subscribe(this);
11 Ponto
Player::leftFeet() {
16 Ponto
Player::rightFeet() {
21 Ponto
Player::leftArm() {
26 Ponto
Player::rightArm() {
31 Ponto
Player::cintura() {
36 Ponto
Player::pescoco() {
41 void Player::desenha() {
42 game
->desenhaMira(aim
);
44 glTranslatef(getX(),getY(),0);
45 Ponto leftfeet
= leftFeet();
46 Ponto rightfeet
= rightFeet();
47 Ponto hips
= cintura();
48 Ponto leftarm
= leftArm();
49 Ponto rightarm
= rightArm();
50 Ponto neck
= pescoco();
52 glVertex3f(hips
.x
,hips
.y
,0);
53 glVertex3f(neck
.x
,neck
.y
,0);
55 glVertex3f(leftfeet
.x
,leftfeet
.y
,0);
56 glVertex3f(hips
.x
,hips
.y
,0);
58 glVertex3f(rightfeet
.x
,rightfeet
.y
,0);
59 glVertex3f(hips
.x
,hips
.y
,0);
61 glVertex3f(leftarm
.x
,leftarm
.y
,0);
62 glVertex3f(neck
.x
,neck
.y
,0);
64 glVertex3f(rightarm
.x
,rightarm
.y
,0);
65 glVertex3f(neck
.x
,neck
.y
,0);
68 glTranslatef(neck
.x
,neck
.y
-10,0);
75 Linha
Player::getBaseLine() {
76 Ponto leftfeet
= leftFeet();
77 Ponto rightfeet
= rightFeet();
78 Linha
ret(leftfeet
.x
+getX(),leftfeet
.y
+getY(),rightfeet
.x
+getX(),rightfeet
.y
+getY());
82 void Player::setAim(double x
, double y
) {