-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathEvent.h
72 lines (71 loc) · 1.81 KB
/
Event.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/////////////////////////////////////////////////////////////////////
///////////////Original file by:Fyodor Zagumennov aka Sgw32//////////
///////////////Copyright(c) 2010 Fyodor Zagumennov //////////
/////////////////////////////////////////////////////////////////////
#pragma once
#include <Ogre.h>
#include "OgreConsole.h"
#include "global.h"
#include "PhysObject.h"
#include "func_door.h"
#include "CutScene.h"
#include <OIS/OIS.h>
//LUA
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
//ENDLUA
#include <vector>
class Event:public FrameListener
{
public:
Event(Ogre::Root* root,bool on,String name);
~Event();
void trigger();
String getName()
{
return mName;
}
void setChangelevel(Ogre::String map);
void setPlayer(Vector3 dest,Real secs,String event);
void setSpawnPhys(String name,String fileName,Vector3 dest, Real secs);
void setOpenDoor(func_door* door,String event,Real secs);
void setStartCutScene(CutScene* cscene);
void addLuaScript(String script)
{
script_callback=true;
luascripts.push_back(script);
}
void addLuaScript2(String script, Real secs);
void interpretate_callback();
void dispose();
virtual bool frameStarted(const Ogre::FrameEvent &evt);
private:
lua_State* pLuaState;
bool started,once,unloaded;
bool player_callback;
bool entc_callback;
bool changelevel_callback;
bool cutscene_callback;
bool door_callback;
bool script_callback;
Ogre::Root* mRoot;
CutScene* mCscene;
vector<String> entc_name;
vector<String> entc_meshFile;
vector<Real> entc_secs;
vector<Vector3> entc_spawn;
vector<func_door*> doors;
vector<String> d_events;
vector<Real> d_secs;
vector<String> luascripts;
vector<Real> l_secs;
vector<Real> l_secs2;
Real maxwait;
String mName;
int i;
//entc player
Vector3 player_spawn;
String player_event,mMap;
Real playerwait,timeAfterrun;
};