CharacterData inherits from Entity
This commit is contained in:
@@ -24,27 +24,18 @@
|
|||||||
|
|
||||||
//components
|
//components
|
||||||
#include "character_defines.hpp"
|
#include "character_defines.hpp"
|
||||||
#include "vector2.hpp"
|
#include "entity.hpp"
|
||||||
#include "statistics.hpp"
|
#include "statistics.hpp"
|
||||||
|
|
||||||
//std namespace
|
//std namespace
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
class CharacterData {
|
class CharacterData: public Entity {
|
||||||
public:
|
public:
|
||||||
CharacterData() = default;
|
CharacterData() = default;
|
||||||
~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
|
//accessors and mutators
|
||||||
Statistics* GetBaseStats() { return &baseStats; }
|
Statistics* GetBaseStats() { return &baseStats; }
|
||||||
|
|
||||||
@@ -56,11 +47,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class CharacterManager;
|
friend class CharacterManager;
|
||||||
|
|
||||||
//world position
|
|
||||||
int roomIndex = 0;
|
|
||||||
Vector2 origin = {0.0,0.0};
|
|
||||||
Vector2 motion = {0.0,0.0};
|
|
||||||
|
|
||||||
Statistics baseStats;
|
Statistics baseStats;
|
||||||
|
|
||||||
int owner;
|
int owner;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#config
|
#config
|
||||||
INCLUDES+=. ../server_utilities ../../common/gameplay ../../common/utilities
|
INCLUDES+=. ../entities ../server_utilities ../../common/gameplay ../../common/utilities
|
||||||
LIBS+=
|
LIBS+=
|
||||||
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class DoorData: Entity {
|
class DoorData: public Entity {
|
||||||
public:
|
public:
|
||||||
DoorData() = default;
|
DoorData() = default;
|
||||||
~DoorData() = default;
|
~DoorData() = default;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class MonsterData: Entity {
|
class MonsterData: public Entity {
|
||||||
public:
|
public:
|
||||||
MonsterData() = default;
|
MonsterData() = default;
|
||||||
~MonsterData() = default;
|
~MonsterData() = default;
|
||||||
|
|||||||
Reference in New Issue
Block a user