forked from Pinkii-/No-desde-el-accidente
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTongue.hpp
46 lines (33 loc) · 838 Bytes
/
Tongue.hpp
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef TONGUE_HPP
#define TONGUE_HPP
#include "utils.hpp"
class Tongue{
public:
Tongue();
//Getters
sf::Vector2f getOrig() const;
sf::Vector2f getDest() const;
//Setters
void reset();//Basicaly sets time to 0 ;
void setOrig(const sf::Vector2f &value);
void setDest(const sf::Vector2f &value);
//Game Functions
void update(float deltatime);
void draw(sf::RenderWindow& window);
//Utility Functions
float getAngle(sf::Vector2f &orig, sf::Vector2f &des);
float getModule(sf::Vector2f &orig, sf::Vector2f &des);
private:
//Positions
sf::Vector2f orig;
sf::Vector2f dest;
//Images
sf::Sprite sprite;
sf::Texture texture;
//Variables
float size;
float angle;
float animationTime;
float timeSinceTriggered;
};
#endif // TONGUE_HPP