My Project
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
ParaEngine::IObjectScriptingInterface Class Reference
Inheritance diagram for ParaEngine::IObjectScriptingInterface:
ParaEngine::CBaseObject ParaEngine::CBlockWorld ParaEngine::CEffectFileBase ParaTerrain::CGlobalTerrain ParaEngine::C3DCanvas ParaEngine::CContainerObject ParaEngine::CDynamicObject ParaEngine::CGeosetObject ParaEngine::CManagedLoader ParaEngine::CRenderTarget ParaEngine::CSceneObject ParaEngine::CSphereObject ParaEngine::CTileObject ParaEngine::CWeatherEffect ParaEngine::CZoneNode ParaEngine::WeatherParticleSpawner ParaEngine::BlockWorldClient ParaEngine::CEffectFile ParaEngine::CEffectFileDirectX ParaEngine::CEffectFileOpenGL

Classes

struct  ScriptCallback
 the game object will keep a list of script call backs. More...
 

Public Types

typedef std::vector< ScriptCallbackObjectCallbackPool_Type
 

Public Member Functions

virtual bool AddScriptCallback (int func_type, const string &script_func)
 add a new call back handler. More...
 
virtual ScriptCallbackGetScriptCallback (int func_type)
 return NULL if there is no associated script. More...
 
virtual bool RemoveScriptCallback (int func_type)
 remove a call back handler
 

Protected Attributes

ObjectCallbackPool_Type m_callback_scripts
 the NPL script handlers
 

Member Function Documentation

§ AddScriptCallback()

bool IObjectScriptingInterface::AddScriptCallback ( int  func_type,
const string &  script_func 
)
virtual

add a new call back handler.

it will override the previous one if any.

Parameters
script_funcformat is [filename];[scode] where file name can be any NPL address, scode is a short code sequence to execute. it may has the same format as the GUI event handler. e.g. ";function1()" : calling a global function "(gl)script/character/npc.lua;npc.on_click()" : load script if not loaded before and then calling a global function if this is "", RemoveScriptCallback() will be called.

§ GetScriptCallback()

IObjectScriptingInterface::ScriptCallback * IObjectScriptingInterface::GetScriptCallback ( int  func_type)
virtual

return NULL if there is no associated script.


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