Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
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);
}
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.

Definition at line 115 of file tools.c.


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