-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathduder.h
More file actions
49 lines (34 loc) · 1.03 KB
/
duder.h
File metadata and controls
49 lines (34 loc) · 1.03 KB
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
#ifndef _DUDER_H_
#define _DUDER_H_
#include <string>
#include <utility>
#include "sdl_compat.h"
#include "geom.h"
#include "object.h"
using namespace std;
class PhysicsWorld;
class Duder : public Object{
public:
Duder(){};
Duder(float x, float y, float width, float height);
~Duder(){};
void update(int w, int h, float target_x = 0, float target_y = 0, float target_vx = 0, float target_vy = 0);
void draw(void);
void initPhysics(PhysicsWorld& world) override;
void syncFromPhysics() override;
void setPhysicsWorld(PhysicsWorld* world) { physicsWorldPtr = world; }
Point vel;
Point encounter_pos; // where the duder was first touched
float angle; // rotation in radians
bool is_killed;
bool is_following;
bool is_launched;
float launch_life; // seconds remaining before launched duder expires
int random_val;
pair<const string, string> *bias;
GameColor color;
private:
float thick;
PhysicsWorld* physicsWorldPtr = nullptr;
};
#endif