diff options
Diffstat (limited to 'src/components/controllable.cpp')
-rw-r--r-- | src/components/controllable.cpp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/components/controllable.cpp b/src/components/controllable.cpp new file mode 100644 index 0000000..a4d45f2 --- /dev/null +++ b/src/components/controllable.cpp | |||
@@ -0,0 +1,71 @@ | |||
1 | #include "controllable.h" | ||
2 | |||
3 | int ControllableComponent::getLeftKey() const | ||
4 | { | ||
5 | return leftKey; | ||
6 | } | ||
7 | |||
8 | void ControllableComponent::setLeftKey(int k) | ||
9 | { | ||
10 | leftKey = k; | ||
11 | } | ||
12 | |||
13 | int ControllableComponent::getRightKey() const | ||
14 | { | ||
15 | return rightKey; | ||
16 | } | ||
17 | |||
18 | void ControllableComponent::setRightKey(int k) | ||
19 | { | ||
20 | rightKey = k; | ||
21 | } | ||
22 | |||
23 | int ControllableComponent::getJumpKey() const | ||
24 | { | ||
25 | return jumpKey; | ||
26 | } | ||
27 | |||
28 | void ControllableComponent::setJumpKey(int k) | ||
29 | { | ||
30 | jumpKey = k; | ||
31 | } | ||
32 | |||
33 | int ControllableComponent::getDropKey() const | ||
34 | { | ||
35 | return dropKey; | ||
36 | } | ||
37 | |||
38 | void ControllableComponent::setDropKey(int k) | ||
39 | { | ||
40 | dropKey = k; | ||
41 | } | ||
42 | |||
43 | bool ControllableComponent::isFrozen() const | ||
44 | { | ||
45 | return frozen; | ||
46 | } | ||
47 | |||
48 | void ControllableComponent::setFrozen(bool f) | ||
49 | { | ||
50 | frozen = f; | ||
51 | } | ||
52 | |||
53 | bool ControllableComponent::isHoldingLeft() const | ||
54 | { | ||
55 | return holdingLeft; | ||
56 | } | ||
57 | |||
58 | void ControllableComponent::setHoldingLeft(bool f) | ||
59 | { | ||
60 | holdingLeft = f; | ||
61 | } | ||
62 | |||
63 | bool ControllableComponent::isHoldingRight() const | ||
64 | { | ||
65 | return holdingRight; | ||
66 | } | ||
67 | |||
68 | void ControllableComponent::setHoldingRight(bool f) | ||
69 | { | ||
70 | holdingRight = f; | ||
71 | } | ||