-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathComputer.h
79 lines (74 loc) · 1.33 KB
/
Computer.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
73
74
75
76
77
78
79
#pragma once
#include "Ogre.h"
//#include "global.h" //already included in Display header
#include "Display.h"
#include "HUD.h"
#include "MagicManager.h"
extern "C"
{
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
}
using namespace Ogre;
using namespace OgreNewt;
#ifndef _COMPUTER_H_
#define _COMPUTER_H_
class Computer //: public FrameListener
{
public:
Computer();
~Computer();
void init(SceneNode* cComp,int type,String fileName);
void init(SceneNode* cComp,int type,String fileName,String dispMatName);
void setName(String name)
{
mName=name;
}
String getName(void)
{
return mName;
}
void power();
void setNearScript(String lua)
{
mNearLua=lua;
}
void setShutdownScript(String lua)
{
msLua=lua;
}
void logoff();
void explode();
void reset();
void del();
void setAllowVirtualDisplay(bool allow)
{
allowVirtualDisplay=allow;
}
SceneNode* getComp()
{
return mComp;
}
void activateMagic(bool act)
{
mActMagic=act;
}
virtual bool frameStarted(const Ogre::FrameEvent &evt);
virtual bool frameEnded(const Ogre::FrameEvent &evt);
String mDispMatName;
private:
bool mActMagic;
bool notice;
bool allowVirtualDisplay;
String mNearLua;
String mName;
String msLua;
SceneNode* mComp;
OgreNewt::Body* bod;
OgreNewt::World* mWorld;
String luaFlName;
Real mFov;
lua_State* pLuaState;
};
#endif