-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscripting.h
More file actions
52 lines (44 loc) · 1.21 KB
/
scripting.h
File metadata and controls
52 lines (44 loc) · 1.21 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
49
50
51
#ifndef __SCRIPTING_H__
#define __SCRIPTING_H__
#include <drawstuff/drawstuff.h>
#include "automate.h"
//////////////////////////////////////////////////////////////////////////
// Machine Interface to automat //
//////////////////////////////////////////////////////////////////////////
class LeftTrackMachine : public Machine {
public:
LeftTrackMachine(Simulation* sim) : Machine(sim) {}
void Event() {
m_sim->setSpeed(1, m_sim->max_speed);
};
};
class LeftRightHalfMachine:public Machine {
public:
LeftRightHalfMachine(Simulation* sim) : Machine(sim) {}
void Event() {
m_sim->setSpeed(1, m_sim->max_speed);
m_sim->setSpeed(0, m_sim->max_speed / 2);
};
};
class FullSpeedAheadMachine:public Machine {
public:
FullSpeedAheadMachine(Simulation* sim) : Machine(sim) {}
void Event() {
m_sim->setSpeed(0, m_sim->max_speed);
m_sim->setSpeed(1, m_sim->max_speed);
};
};
class DoNothingMachine : public Machine {
public:
DoNothingMachine(Simulation* sim) : Machine(sim) {}
void Event() { // hahaha
};
};
class ExitMachine: public Machine {
public:
ExitMachine(Simulation* sim) : Machine(sim) {}
void Event() {
dsStop();
};
};
#endif // __SCRIPTING_H__