-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEngineInput.h
More file actions
45 lines (37 loc) · 935 Bytes
/
Copy pathEngineInput.h
File metadata and controls
45 lines (37 loc) · 935 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
42
43
44
45
// Input from the control environment to the state machine that
// models the gameworld.
//
// Author: Michael DiBernardo
//
// REFERENCES:
// None
#ifndef __ENGINE_INPUT_H__
#define __ENGINE_INPUT_H__
#include "Basics.h"
class EngineInput {
public:
// Creates a collection of states where all bits are 0.
EngineInput();
// Frees resources used by this object.
~EngineInput();
// Getters and setters for control inputs.
void setPlayerMovingForward(bool b);
void setPlayerMovingBackward(bool b);
void setPlayerTurningLeft(bool b);
void setPlayerTurningRight(bool b);
bool playerMovingForward() const;
bool playerMovingBackward() const;
bool playerTurningLeft() const;
bool playerTurningRight() const;
private:
// Moving forward?
bool mf_;
// Moving backward?
bool mb_;
// Turning left?
bool tl_;
// Turning right?
bool tr_;
DISALLOW_EVIL_CONSTRUCTORS(EngineInput);
};
#endif