Consertado "efeito metralhadora" que aparece num F7-spam
[Projeto-PCG.git] / thing.cpp
blob1ed77bbbb5e81adc7d2d5a86db7ee888e8d2b5b1
1 #include "thing.h"
3 Thing::Thing() {
4 onGround = false;
5 maxspeed.x = 99999;
6 maxspeed.y = 99999;
7 gravityRate = 0.3;
8 dead = false;
11 void Thing::addSpeed(double xspeed, double yspeed) {
12 setSpeed(velocidade.x+xspeed,velocidade.y+yspeed);
15 void Thing::setSpeed(double xspeed, double yspeed) {
16 velocidade.x = std::max(std::min(xspeed,maxspeed.x),-maxspeed.x);
17 velocidade.y = std::max(std::min(yspeed,maxspeed.y),-maxspeed.y);
20 void Thing::setPosition(double x, double y) {
21 posicao.x = x;
22 posicao.y = y;
25 void Thing::move() {
26 posicao.x += velocidade.x;
27 posicao.y += velocidade.y;
30 Linha Thing::getBaseLine() {
31 Linha ret(0,0,0,0);
32 return ret;
35 Polygon Thing::getCollision() {
36 Polygon poly;
37 return poly;
40 void Thing::collide(Thing* b) {
41 return;