public static void Register(Event ev, PhxLuaRuntime.LFunction callback) { if (Callbacks.TryGetValue(ev, out var callbacks)) { callbacks.Add(callback); return; } Callbacks.Add(ev, new List <PhxLuaRuntime.LFunction>() { callback }); }
public int AddCallback(T key, PhxLuaRuntime.LFunction callback) { if (Callbacks.TryGetValue(key, out List <PhxLuaRuntime.LFunction> callbacks)) { callbacks.Add(callback); return(callbacks.Count - 1); } callbacks = new List <PhxLuaRuntime.LFunction>() { callback }; Callbacks.Add(key, callbacks); return(callbacks.Count - 1); }
public static void OnTeamPointsChangeTeam(PhxLuaRuntime.LFunction callback, int teamIdx) { }
public static void OnTeamPointsChange(PhxLuaRuntime.LFunction callback) { }
public static void OnObjectDamageName(PhxLuaRuntime.LFunction callback, string objName) { }
public static void OnObjectKillClass(PhxLuaRuntime.LFunction callback, string className) { }
public static void OnObjectKillTeam(PhxLuaRuntime.LFunction callback, int teamIdx) { }
public static void OnCommandPostKill(PhxLuaRuntime.LFunction callback) { // callback paramters: // - postPtr }
// =============================================================================================================== // Event Callbacks // =============================================================================================================== public static void OnCharacterDeath(PhxLuaRuntime.LFunction callback) { }
public static void OnFinishCaptureName(PhxLuaRuntime.LFunction callback, string cpName) { GameLuaEvents.Register(GameLuaEvents.Event.OnFinishCaptureName, callback, cpName); // callback paramters: // - postPtr }
public static void OnLeaveRegion(PhxLuaRuntime.LFunction callback, string regionName) { GameLuaEvents.Register(GameLuaEvents.Event.OnLeaveRegion, callback, regionName); }
public static void OnEnterRegionTeam(PhxLuaRuntime.LFunction callback, string regionName, int teamIdx) { GameLuaEvents.Register(GameLuaEvents.Event.OnEnterRegionTeam, callback, (regionName, teamIdx)); }
public static void OnTimerElapse(PhxLuaRuntime.LFunction callback, int timer) { GameLuaEvents.Register(GameLuaEvents.Event.OnTimerElapse, callback, timer); }
public static void OnTicketCountChange(PhxLuaRuntime.LFunction callback) { // TicketCount seems to be the reinforcement count, see Objective.lua:192 }
public static void OnCharacterDeathTeam(PhxLuaRuntime.LFunction callback, int teamIdx) { }
public static void OnFinishNeutralize(PhxLuaRuntime.LFunction callback) { GameLuaEvents.Register(GameLuaEvents.Event.OnFinishNeutralize, callback); // callback paramters: // - postPtr }
public static void Register(Event ev, PhxLuaRuntime.LFunction callback, object key) { Get(ev).AddCallback(key, callback); }