-
Notifications
You must be signed in to change notification settings - Fork 0
/
AlienStateMachine.hpp
63 lines (54 loc) · 1.87 KB
/
AlienStateMachine.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
#ifndef ALIENSTATEMACHINE_HPP
#define ALIENSTATEMACHINE_HPP
#include <vector>
#include "DirectKinematicV.hpp"
#include "Triple.hpp"
class Mobile;
class Wander;
class Arrive;
class Pursue;
class Evade;
class PathFollowing;
class AlienStateMachine : public virtual DirectKinematicV {
public :
enum class States : unsigned int {
Wander,
Arrive,
Pursue,
Evade,
Path,
};
Mobile *character;
Mobile *target;
States state;
Wander *wander;
Arrive *arrive;
Pursue *pursue;
Evade *evade;
double maxSpeed;
double targetRadius;
double slowRadius;
std::vector<PathFollowing *> paths;
unsigned int last_ticks;
AlienStateMachine(std::string name, Mobile *character, Mobile *target,
double maxRotationW,
double targetRadiusW,
double slowRadiusW,
double wanderOffsetW,
double wanderRadiusW,
double wanderRateW,
double wanderTimeW,
double maxSpeedW,
double maxSpeedA,
double targetRadiusA,
double slowRadiusA,
double maxSpeedP,
double maxSpeedE,
double maxSpeed,
double targetRadius,
double slowRadius
);
virtual ~AlienStateMachine();
virtual std::vector<Triple> getVel(unsigned int ticks, unsigned int delta_ticks);
};
#endif