Merge branch 'master' of git@github.com:andreferreira/Projeto-PCG
[Projeto-PCG.git] / weaponitem.cpp
blob9fe777059e48e7704bac21341cdc6825907cb23f
1 #include "weaponitem.h"
3 WeaponItem::WeaponItem(Weapon *a, Polygon c): arma(a), collision(c) {
4 setSpeed(0, 0);
5 maxspeed.x = 5;
6 maxspeed.y = 20;
7 bypass = false;
8 onGround = false;
11 Polygon WeaponItem::getCollision() {
12 return collision;
15 void WeaponItem::desenha() {
16 glPushMatrix();
17 glTranslatef(posicao.x, posicao.y, 0);
18 //glRotatef(180, 0, 0, -1);
19 arma->desenha();
20 glPopMatrix();
23 Linha WeaponItem::getBaseLine() {
24 return collision.linhas[2]; // minX, minY, maxX, minY
27 void WeaponItem::collide(Thing* b) {
28 //static int i = 0;
29 //std::cout << "lol " << i++ << std::endl;