Slight tweaks to waypoints
This commit is contained in:
@@ -28,3 +28,19 @@ int WaypointData::SetTriggerReference(int i) {
|
||||
int WaypointData::GetTriggerReference() {
|
||||
return triggerRef;
|
||||
}
|
||||
|
||||
BoundingBox WaypointData::SetBoundingBox(BoundingBox b) {
|
||||
return bounds = b;
|
||||
}
|
||||
|
||||
BoundingBox WaypointData::GetBoundingBox() {
|
||||
return bounds;
|
||||
}
|
||||
|
||||
Vector2 WaypointData::SetOrigin(Vector2 v) {
|
||||
return origin = v;
|
||||
}
|
||||
|
||||
Vector2 WaypointData::GetOrigin() {
|
||||
return origin;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
#ifndef WAYPOINTDATA_HPP_
|
||||
#define WAYPOINTDATA_HPP_
|
||||
|
||||
#include "entity.hpp"
|
||||
#include "bounding_box.hpp"
|
||||
#include "vector2.hpp"
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#include "lua/lua.hpp"
|
||||
@@ -32,7 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
class WaypointData: public Entity {
|
||||
class WaypointData {
|
||||
public:
|
||||
WaypointData() = default;
|
||||
~WaypointData() = default;
|
||||
@@ -40,10 +41,18 @@ public:
|
||||
int SetTriggerReference(int i);
|
||||
int GetTriggerReference();
|
||||
|
||||
BoundingBox SetBoundingBox(BoundingBox b);
|
||||
BoundingBox GetBoundingBox();
|
||||
|
||||
Vector2 SetOrigin(Vector2 v);
|
||||
Vector2 GetOrigin();
|
||||
|
||||
private:
|
||||
friend class WaypointManager;
|
||||
|
||||
int triggerRef = LUA_NOREF;
|
||||
BoundingBox bounds;
|
||||
Vector2 origin;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -25,22 +25,10 @@ int WaypointManager::Create() {
|
||||
//TODO
|
||||
}
|
||||
|
||||
int WaypointManager::Load() {
|
||||
//TODO
|
||||
}
|
||||
|
||||
int WaypointManager::Save(int uid) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void WaypointManager::Unload(int uid) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void WaypointManager::Delete(int uid) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void WaypointManager::UnloadAll() {
|
||||
//TODO
|
||||
}
|
||||
|
||||
@@ -41,10 +41,7 @@ class WaypointManager: public Singleton<WaypointManager> {
|
||||
public:
|
||||
//common public methods
|
||||
int Create();
|
||||
int Load();
|
||||
int Save(int uid);
|
||||
void Unload(int uid);
|
||||
void Delete(int uid);
|
||||
|
||||
void UnloadAll();
|
||||
void UnloadIf(std::function<bool(std::pair<const int, WaypointData const&>)> fn);
|
||||
|
||||
Reference in New Issue
Block a user