Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ScriptInvoker

ScriptInvoker Class provide list of callbacks
usage: Подробнее...

Закрытые члены

proto void Invoke (void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
 invoke call on all inserted methods with given arguments
 
proto bool Insert (func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
 insert method to list
 
proto bool Remove (func fn, int flags=EScriptInvokerRemoveFlags.ALL)
 remove specific call from list
 
proto int Count (func fn)
 count how many times this fn is actively present in the Invoker
 
proto native void Clear ()
 remove all calls from list
 

Подробное описание

ScriptInvoker Class provide list of callbacks
usage:

class Player
{
void OnKilled()
{
m_DeathInvoker.Invoke(this);
}
}
{
Print("RIP " + p);
}
class Game
{
void RemovePlayer(Player p)
{
}
void GameOver()
{
}
}
{
p.m_DeathInvoker.Insert(LogPlayerDeath);
p.m_DeathInvoker.Insert(game.RemovePlayer);
p.m_DeathInvoker.Insert(game.GameOver);
}
Definition EntityAI.c:95
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.

Методы

◆ Clear()

proto native void Clear ( )
private

remove all calls from list

Используется в ConstructionActionData::ConstructionActionData() и CraftingManager::CraftingManager().

◆ Count()

proto int Count ( func fn)
private

count how many times this fn is actively present in the Invoker

◆ Insert()

proto bool Insert ( func fn,
int flags = EScriptInvokerInsertFlags.IMMEDIATE )
private

insert method to list

Используется в ConstructionActionData::ConstructionActionData() и CraftingManager::CraftingManager().

◆ Invoke()

proto void Invoke ( void param1 = NULL,
void param2 = NULL,
void param3 = NULL,
void param4 = NULL,
void param5 = NULL,
void param6 = NULL,
void param7 = NULL,
void param8 = NULL,
void param9 = NULL )
private

invoke call on all inserted methods with given arguments

◆ Remove()

proto bool Remove ( func fn,
int flags = EScriptInvokerRemoveFlags.ALL )
private

remove specific call from list


Объявления и описания членов класса находятся в файле: