-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBoid.hpp
More file actions
31 lines (23 loc) · 703 Bytes
/
Copy pathBoid.hpp
File metadata and controls
31 lines (23 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include <SFML/Graphics.hpp>
class Boid{
public:
Boid(float x, float y, float direcao = 90.0f, float velocidade = 0.25f);
~Boid();
void setDirecao(float direcao){this->direcao = direcao;};
float getDirecao(){return direcao;};
void setVelocidade(float velocidade){this->velocidade = velocidade;};
float getVelocidade(){return velocidade;};
float getX(){return x;};
void setX(float x){this->x = x;};
float getY(){return y;};
void setY(float y){this->y = y;};
sf::ConvexShape& getForma();
void mover();
void girarEmDirecao(float direcao_destino, float passo);
private:
float direcao = 270.0f;
float velocidade;
float x, y;
sf::ConvexShape forma;
};