-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathobject.h
More file actions
41 lines (33 loc) · 719 Bytes
/
Copy pathobject.h
File metadata and controls
41 lines (33 loc) · 719 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
40
41
#ifndef OBJECT_H
#define OBJECT_H
#include "constants.h"
class Object
{
public:
virtual ~Object();
virtual void init();
virtual void update();
virtual void draw();
virtual void setPosition(int new_x, int new_y);
bool collideable = true;
bool solids = true;
Hitbox hitbox;
Vec2d spd;
Vec2d rem;
Type type;
int spr = 0;
Bools flip;
int x = 0;
int y = 0;
bool if_not_fruit = false;
bool is_solid(int ox, int oy);
bool is_ice(int ox, int oy);
Object * collide(Type type, int ox, int oy);
bool check(Type type, int ox, int oy);
void move(float ox, float oy);
void move_x(float amount, float start);
void move_y(float amount);
protected:
Object(Type type);
};
#endif