Monster API clones from Entity API, read more

This is my solution for handling inheritance via lua. The Entity class is
only a base class, so the entity API is designed to be copied from, rather
than used directly.

linit.c: It should be noted that the Entity API must always be placed
before the utilizing child APIs. I don't know about how lua handles things
internally, but I'm assuming that this is the case.

There's no real meat in the API code yet, since that's just busy-work.
Right now I feel beter about writing the connective tissue. This case
could aslo extend to the waypoint and monster APIs.

The waypoint system had some API and class methods removed for brevity.
This commit is contained in:
Kayne Ruse
2015-01-11 19:08:31 +11:00
parent 8ea667a0b5
commit 051ed0f14c
10 changed files with 165 additions and 86 deletions
-4
View File
@@ -36,10 +36,7 @@ class MonsterManager: public Singleton<MonsterManager> {
public:
//common public methods
int Create(std::string);
int Load(std::string);
int Save(int uid);
void Unload(int uid);
void Delete(int uid);
void UnloadAll();
void UnloadIf(std::function<bool(std::pair<const int, MonsterData const&>)> fn);
@@ -47,7 +44,6 @@ public:
//accessors & mutators
MonsterData* Get(int uid);
int GetLoadedCount();
int GetTotalCount();
std::map<int, MonsterData>* GetContainer();
//hooks