-
Notifications
You must be signed in to change notification settings - Fork 0
/
Khrushchev.h
52 lines (44 loc) · 1.01 KB
/
Khrushchev.h
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
/*
* Khrushchev.h
*/
#ifndef __KHRUSHCHEV_H__
#define __KHRUSHCHEV_H__
//Dragonfly Headers
#include "EventCollision.h"
#include "EventFootSoldierDeath.h"
#include "FootSoldier.h"
#include "Object.h"
#include "Position.h"
const int KHRUSHCHEV_HEALTH = 100;
const int KHRUSHCHEV_POINTS = 250;
class Khrushchev : public df::Object {
private:
df::Object *player;
df::Object *jeepL;
df::Object *jeepR;
df::Object *tankM;
int health;
int health_left;
int health_right;
int fire_slowdown;
int fire_countdown;
float move_speed;
bool in_position;
bool going_left;
int jeep_countdown;
int tank_countdown;
void step();
void fire();
void hit(const df::EventCollision *p_collision_event);
void soldierDied(const EventFootSoldierDeath *p_death_event);
void checkMove();
void makeJeep(bool left_jeep);
//draw frames to match where the player is
void draw(void);
public:
Khrushchev(df::Position p, df::Object *new_player);
// Handle event.
// Return 0 if ignored, else 1.
int eventHandler(const df::Event *p_e);
};
#endif