-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobjects.hpp
69 lines (61 loc) · 1.73 KB
/
objects.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include <string>
#include "structs.hpp"
#include "doodler.hpp"
#include "RSDL/src/rsdl.hpp"
#ifndef __OBJECTS_HPP__
#define __OBJECTS_HPP__
class Object
{
public:
Object(int x, int y);
bool is_out_of_range();
void change_vertical_position(int y);
virtual void collision_handeler(Doodler* doodler) = 0;
virtual void draw_me(Window *window, int window_width, int window_height) = 0;
virtual void update_position(int y, int window_width, int window_height);
protected:
int picture_x;
int picture_y;
int width;
int height;
Point position;
Velocity velocity;
std::string picture;
};
class Platform : public Object
{
public:
Platform(int x, int y);
virtual void collision_handeler(Doodler* doodler);
virtual void draw_me(Window *window, int window_width, int window_height);
};
class Mplatform : public Object
{
public:
Mplatform(int x, int y);
virtual void collision_handeler(Doodler* doodler);
virtual void draw_me(Window *window, int window_width, int window_height);
virtual void update_position(int y, int window_width, int window_height);
};
class Bplatform : public Object
{
public:
Bplatform(int x, int y);
virtual void collision_handeler(Doodler* doodler);
virtual void draw_me(Window *window, int window_width, int window_height);
};
class Spring : public Object
{
public:
Spring(int x, int y);
virtual void collision_handeler(Doodler* doodler);
virtual void draw_me(Window *window, int window_width, int window_height);
};
class Enemy : public Object
{
public:
Enemy(int x, int y);
virtual void collision_handeler(Doodler* doodler);
virtual void draw_me(Window *window, int window_width, int window_height);
};
#endif