PGE Engine
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LuaLevelEngine Class Reference
Inheritance diagram for LuaLevelEngine:
LuaEngine

Public Member Functions

 LuaLevelEngine (LevelScene *scene)
 
LVL_PlayercreateLuaPlayer ()
 
LVL_NpccreateLuaNpc (unsigned int id)
 
void destoryLuaNpc (LVL_Npc *npc)
 
void destoryLuaPlayer (LVL_Player *plr)
 
void loadNPCClass (int id, const QString &path)
 
LevelScenegetScene ()
 
QString getNpcBaseClassPath () const
 
void setNpcBaseClassPath (const QString &npcBaseClassPath)
 
QString getPlayerBaseClassPath () const
 
void setPlayerBaseClassPath (const QString &playerBaseClassPath)
 
- Public Member Functions inherited from LuaEngine
 LuaEngine (Scene *scene)
 
void init ()
 Init a new lua engine. The lua engine must be in a invalid state.
 
void shutdown ()
 Shutdowns the lua engine and post a cleanup event.
 
void forceShutdown ()
 Shutdowns the lua engine directly.
 
bool isValid ()
 isValid Checks if the lua engine is valid More...
 
luabind::object loadClassAPI (const QString &path)
 Reads a lua class and returns the object.
 
void loadClassAPI (const QString &nameInGlobal, const QString &path)
 Reads a lua class and puts it in a global object.
 
QString coreFile () const
 The core lua filename.
 
void setCoreFile (const QString &coreFile)
 The core lua filename.
 
void dispatchEvent (LuaEvent &toDispatchEvent)
 Dispatches a lua event.
 
void setErrorReporterFunc (const std::function< void(const QString &, const QString &)> &func)
 The error reporter function.
 
ScenegetBaseScene () const
 The base-scene for the lua engine (may need for interacting with current scene)
 
QString getLuaScriptPath () const
 
void setLuaScriptPath (const QString &luaScriptPath)
 
bool shouldShutdown () const
 
void setLateShutdown (bool value)
 
void postLateShutdownError (luabind::error &error)
 
void runGarbageCollector ()
 
QString getUserFile () const
 
void setUserFile (const QString &userFile)
 

Protected Member Functions

void onBindAll ()
 
- Protected Member Functions inherited from LuaEngine
void loadMultiRet (QFile *file)
 
lua_State * getNativeState ()
 

Protected Attributes

QString m_npcBaseClassPath
 
QString m_playerBaseClassPath
 

The documentation for this class was generated from the following files: