2014-12-15 12:36:04 +00:00
|
|
|
#ifndef TRIGGER_HH_INCLUDED
|
|
|
|
#define TRIGGER_HH_INCLUDED
|
|
|
|
|
|
|
|
#include <vector>
|
2014-12-15 13:59:03 +00:00
|
|
|
#include "object.hh"
|
2015-01-09 15:51:28 +00:00
|
|
|
extern "C" {
|
2015-03-12 14:04:26 +00:00
|
|
|
#include "lua.h"
|
|
|
|
#include "lualib.h"
|
|
|
|
#include "lauxlib.h"
|
2015-01-09 15:51:28 +00:00
|
|
|
}
|
2015-03-12 14:04:26 +00:00
|
|
|
#include "LuaBridge.h"
|
2014-12-15 12:36:04 +00:00
|
|
|
|
2014-12-16 11:19:48 +00:00
|
|
|
class Level;
|
|
|
|
|
2014-12-15 12:36:04 +00:00
|
|
|
class Trigger {
|
|
|
|
public:
|
2015-03-04 13:35:14 +00:00
|
|
|
Trigger(glm::vec3 position, float distance, bool isBigger, Object* object, std::string luaScript, lua_State* L, int objectToChange, std::string scriptPath, bool undo);
|
2015-02-13 12:46:41 +00:00
|
|
|
Trigger();
|
2014-12-15 12:36:04 +00:00
|
|
|
~Trigger();
|
2014-12-15 13:59:03 +00:00
|
|
|
void triggerUpdate();
|
2015-01-13 17:18:13 +00:00
|
|
|
bool deleteNotification(int deletedObjectIndex);
|
2014-12-15 12:36:04 +00:00
|
|
|
private:
|
2014-12-15 17:43:10 +00:00
|
|
|
glm::vec3 position;
|
2014-12-15 13:59:03 +00:00
|
|
|
float distance;
|
|
|
|
bool isBigger;
|
|
|
|
Object* object;
|
2015-01-13 16:21:15 +00:00
|
|
|
std::string luaScript;
|
2015-02-15 18:37:13 +00:00
|
|
|
lua_State* luaState;
|
2015-01-13 12:52:22 +00:00
|
|
|
int objectToChange;
|
2015-03-04 13:35:14 +00:00
|
|
|
bool undo;
|
2014-12-15 12:36:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|