-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcharacter.h
More file actions
40 lines (32 loc) · 743 Bytes
/
character.h
File metadata and controls
40 lines (32 loc) · 743 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
32
33
34
35
36
37
38
39
#ifndef CHARACTER_H
#define CHARACTER_H
#include "SDL/SDL.h"
#include "test.h"
#include "global.h"
#include "living_things.h"
#include "targetable.h"
//The dot that will move around on the screen
class Character : public Living_things, public Targetable
{
private:
int xVel;
int yVel;
// Enum for the direction
enum Direction {
UP,
DOWN,
LEFT,
RIGHT
};
public:
// Initializes the variables
Character(std::string filename);
// Takes key presses and adjusts the dot's velocity
void handle_input();
// Moves the dot
virtual void move() ;
void change_image(Character::Direction direction);
virtual void respawn() ;
bool get_invul();
};
#endif