blob: 8b5121c5cf65916763c1eea5c4b3e623b74baedd (
plain)
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
|
#ifndef EXAMPLE_SHOOTER_PLAYER_H
#define EXAMPLE_SHOOTER_PLAYER_H
#include <yage/yage.h>
#include "direction.h"
enum class Action {
IDLE,
MOVING,
};
class Player : public yage::Drawable
{
public:
Player(const glm::vec4 &bound, const yage::Texture &texture);
void setTexture(const yage::Texture &texture);
void draw(yage::SpriteBatch &sp);
void move(Direction direction);
void idle();
void look(Direction direction);
// simple getters
glm::vec4 position() const;
private:
glm::vec4 bound_;
yage::Texture texture_;
Direction direction_;
Action action_;
int speed_;
};
#endif
|