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