CharacterData inherits from Entity
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#config
|
||||
INCLUDES+=. ../server_utilities ../../common/gameplay ../../common/utilities
|
||||
INCLUDES+=. ../entities ../server_utilities ../../common/gameplay ../../common/utilities
|
||||
LIBS+=
|
||||
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
class DoorData: Entity {
|
||||
class DoorData: public Entity {
|
||||
public:
|
||||
DoorData() = default;
|
||||
~DoorData() = default;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
class MonsterData: Entity {
|
||||
class MonsterData: public Entity {
|
||||
public:
|
||||
MonsterData() = default;
|
||||
~MonsterData() = default;
|
||||
|
||||
Reference in New Issue
Block a user