Implement some more base types, including basic units. This should be much closer to final interface
This commit is contained in:
parent
51cdda821d
commit
64f9638352
9 changed files with 174 additions and 74 deletions
26
game/unit.h
Normal file
26
game/unit.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
#ifndef _UNIT_H_
|
||||
#define _UNIT_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "vector2.h"
|
||||
|
||||
// Type for the unit type-id
|
||||
typedef char unit_t;
|
||||
|
||||
// Base unit type
|
||||
template < unit_t unit_type >
|
||||
class CUnit
|
||||
{
|
||||
public:
|
||||
|
||||
CUnit() = default;
|
||||
virtual ~CUnit() = default;
|
||||
|
||||
private:
|
||||
|
||||
// All units must have position
|
||||
uvector2 pos;
|
||||
};
|
||||
|
||||
#endif //_UNIT_H_
|
Loading…
Add table
Add a link
Reference in a new issue