summaryrefslogtreecommitdiff
path: root/Unit.h
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2018-08-05 18:06:49 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2018-08-05 18:06:49 +0200
commitefc7020defa40c74a467442e6763df71c0783fd0 (patch)
treefa3f7cf7648e7e05ed0483cf25ead7712f2fc0da /Unit.h
parent6ecb59761ac940e66c9670d23dd65696df3df7cf (diff)
downloadpocketempires-efc7020defa40c74a467442e6763df71c0783fd0.tar.gz
* Increased MAX_SELECTION_DISTANCE, but this should be done according to BaseUnit instead!HEADmaster
+ BaseUnit now takes a pointer to a Camera object. + Implemented Unit basic movement. + Initial stub for Coordinates class, meant to replace all manual X/Y coordinates handling between classes.
Diffstat (limited to 'Unit.h')
-rw-r--r--Unit.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Unit.h b/Unit.h
index e110ba7..ea5efdf 100644
--- a/Unit.h
+++ b/Unit.h
@@ -45,9 +45,17 @@ class Unit : public BaseUnit
void create(const enum Unit::tUnitID eUnitID, const uint16_t x, const uint16_t y);
void handler(void);
void drawHandler(void);
+ void moveTo(const uint16_t x, const uint16_t y);
private:
enum tUnitID _eUnitID;
+ enum tUnitState
+ {
+ UNIT_STATE_IDLE,
+ UNIT_STATE_MOVING
+ } _eState;
+ uint16_t _target_x;
+ uint16_t _target_y;
};
#endif /* UNIT_H__ */