Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
ScriptInvoker Class Reference

ScriptInvoker Class provide list of callbacks
usage: More...

Detailed Description

ScriptInvoker Class provide list of callbacks
usage:

class Player
{
ref ScriptInvoker m_DeathInvoker = new ScriptInvoker();
void OnKilled()
{
m_DeathInvoker.Invoke(this);
}
}
void LogPlayerDeath(p)
{
Print("RIP " + p);
}
class Game
{
void RemovePlayer(Player p)
{
}
void GameOver()
{
}
}
void OnPlayerSpaned(Player p)
{
Game game = GetGame();
p.m_DeathInvoker.Insert(LogPlayerDeath);
p.m_DeathInvoker.Insert(game.RemovePlayer);
p.m_DeathInvoker.Insert(game.GameOver);
}

Definition at line 115 of file tools.c.


The documentation for this class was generated from the following file:
GetGame
proto native CGame GetGame()
Print
proto void Print(void var)
Prints content of variable to console/log.
ScriptInvoker
ScriptInvoker Class provide list of callbacks usage:
Definition: tools.c:115