repo.or.cz
/
Projeto-PCG.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sistema de gravidade porco, mas funcionando
[Projeto-PCG.git]
/
player.cpp
blob
71b26516e889d425cb01c620794de51f09ae38fe
1
#include
"player.h"
2
#include
"gravity.h"
3
4
Player
::
Player
(
Game
*
agame
) {
5
setPosition
(
40
,
40
);
6
setSpeed
(
0
,
0
);
7
game
=
agame
;
8
game
->
gravityManager
->
subscribe
(
this
);
9
}
10
11
void
Player
::
desenha
() {
12
glPushMatrix
();
13
glTranslatef
(
getX
(),
getY
(),
0
);
14
drawCircle
(
10
,
30
);
15
glPopMatrix
();
16
}
17
18
19
Rect
Player
::
getBaseRect
() {
20
Rect
ret
(-
10
+
getX
(),-
10
+
getY
(),
10
+
getX
(),
10
+
getY
());
21
return
ret
;
22
}