CharacterData inherits from Entity

This commit is contained in:
Kayne Ruse
2014-11-05 23:02:14 +11:00
parent 5327d91917
commit 966443be3d
4 changed files with 5 additions and 19 deletions
+2 -16
View File
@@ -24,27 +24,18 @@
//components
#include "character_defines.hpp"
#include "vector2.hpp"
#include "entity.hpp"
#include "statistics.hpp"
//std namespace
#include <string>
#include <cmath>
class CharacterData {
class CharacterData: public Entity {
public:
CharacterData() = default;
~CharacterData() = default;
//location and movement
int SetRoomIndex(int i) { return roomIndex = i; }
Vector2 SetOrigin(Vector2 v) { return origin = v; }
Vector2 SetMotion(Vector2 v) { return motion = v; }
int GetRoomIndex() { return roomIndex; }
Vector2 GetOrigin() { return origin; }
Vector2 GetMotion() { return motion; }
//accessors and mutators
Statistics* GetBaseStats() { return &baseStats; }
@@ -56,11 +47,6 @@ public:
private:
friend class CharacterManager;
//world position
int roomIndex = 0;
Vector2 origin = {0.0,0.0};
Vector2 motion = {0.0,0.0};
Statistics baseStats;
int owner;