ParaEngine¶
-
namespace
ParaEngine
¶ Functions
-
int
my_rand
()¶
-
class
IObjectScriptingInterface
¶ Public Functions
-
bool
AddScriptCallback
(int func_type, const string &script_func)¶ add a new call back handler. it will override the previous one if any.
- Parameters
script_func
: format 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.
-
IObjectScriptingInterface::ScriptCallback *
GetScriptCallback
(int func_type)¶ return NULL if there is no associated script.
-
bool
RemoveScriptCallback
(int func_type)¶ remove a call back handler
-
struct
ScriptCallback
¶ - #include <IObjectScriptingInterface.h>
the game object will keep a list of script call backs.
Public Functions
-
void
SetScriptFunc
(const std::string &script)¶ set the script function
-
int
ActivateAsync
(const std::string &code)¶ activate the script callback with the given code.
-
int
ActivateLocalNow
(const std::string &script)¶ activate the script callback locally now. when function returns, the script has returned.
-
void
-
bool
-
int