107 pluginPtrs.Reserve(regCount);
119 pluginPtrs.Insert(moduleNew);
139 if ( plugin != NULL )
183 protected void RegisterPlugin(
string plugin_class_name,
bool reg_on_client,
bool reg_on_server,
bool reg_on_release =
true )
185 if ( !reg_on_client )
193 if ( !reg_on_server )
195 if (
GetGame().IsMultiplayer() )
204 if ( !reg_on_release )
233 RegisterPlugin(plugin_class_name, reg_on_client, reg_on_server,
false);
238 protected void RegisterPluginDiag(
string plugin_class_name,
bool reg_on_client,
bool reg_on_server )
240 #ifdef DIAG_DEVELOPER
241 RegisterPlugin(plugin_class_name, reg_on_client, reg_on_server,
true);
252 typename plugin_type = plugin_class_name.
ToType();
324 if ( plugin == null )
326 #ifdef DIAG_DEVELOPER
329 PrintString(
"Module " + plugin_type.ToString() +
" is not Registred in PluginManager.c!");
343 return (
GetPlugin(plugin_type) != NULL );
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
PluginBase GetPlugin(typename plugin_type)
bool IsPluginManagerExists()
bool IsModuleExist(typename plugin_type)
class PluginManager g_Plugins
void PluginManagerDelete()
override ScriptInvoker GetUpdateQueue(int call_category)
void OnUpdate(float delta_time)
PluginBase GetPluginByType(typename plugin_type)
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
void RegisterPluginDebug(string plugin_class_name, bool reg_on_client, bool reg_on_server)
Register new PluginBase to PluginManager for storing and handling plugin.
bool UnregisterPlugin(string plugin_class_name)
ref map< typename, ref PluginBase > m_PluginsPtrs
void RegisterPluginDiag(string plugin_class_name, bool reg_on_client, bool reg_on_server)
void MainOnUpdate(float delta_time)
ref array< typename > m_PluginRegister
void RegisterPlugin(string plugin_class_name, bool reg_on_client, bool reg_on_server, bool reg_on_release=true)
Register new PluginBase to PluginManager for storing and handling plugin.
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto void DumpStack()
Prints current call stack (stack trace)
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...