Exemple #1
0
 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
     });
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public static void OnTeamPointsChangeTeam(PhxLuaRuntime.LFunction callback, int teamIdx)
 {
 }
Exemple #4
0
 public static void OnTeamPointsChange(PhxLuaRuntime.LFunction callback)
 {
 }
Exemple #5
0
 public static void OnObjectDamageName(PhxLuaRuntime.LFunction callback, string objName)
 {
 }
Exemple #6
0
 public static void OnObjectKillClass(PhxLuaRuntime.LFunction callback, string className)
 {
 }
Exemple #7
0
 public static void OnObjectKillTeam(PhxLuaRuntime.LFunction callback, int teamIdx)
 {
 }
Exemple #8
0
 public static void OnCommandPostKill(PhxLuaRuntime.LFunction callback)
 {
     // callback paramters:
     // - postPtr
 }
Exemple #9
0
    // ===============================================================================================================
    // Event Callbacks
    // ===============================================================================================================

    public static void OnCharacterDeath(PhxLuaRuntime.LFunction callback)
    {
    }
Exemple #10
0
 public static void OnFinishCaptureName(PhxLuaRuntime.LFunction callback, string cpName)
 {
     GameLuaEvents.Register(GameLuaEvents.Event.OnFinishCaptureName, callback, cpName);
     // callback paramters:
     // - postPtr
 }
Exemple #11
0
 public static void OnLeaveRegion(PhxLuaRuntime.LFunction callback, string regionName)
 {
     GameLuaEvents.Register(GameLuaEvents.Event.OnLeaveRegion, callback, regionName);
 }
Exemple #12
0
 public static void OnEnterRegionTeam(PhxLuaRuntime.LFunction callback, string regionName, int teamIdx)
 {
     GameLuaEvents.Register(GameLuaEvents.Event.OnEnterRegionTeam, callback, (regionName, teamIdx));
 }
Exemple #13
0
 public static void OnTimerElapse(PhxLuaRuntime.LFunction callback, int timer)
 {
     GameLuaEvents.Register(GameLuaEvents.Event.OnTimerElapse, callback, timer);
 }
Exemple #14
0
 public static void OnTicketCountChange(PhxLuaRuntime.LFunction callback)
 {
     // TicketCount seems to be the reinforcement count, see Objective.lua:192
 }
Exemple #15
0
 public static void OnCharacterDeathTeam(PhxLuaRuntime.LFunction callback, int teamIdx)
 {
 }
Exemple #16
0
 public static void OnFinishNeutralize(PhxLuaRuntime.LFunction callback)
 {
     GameLuaEvents.Register(GameLuaEvents.Event.OnFinishNeutralize, callback);
     // callback paramters:
     // - postPtr
 }
Exemple #17
0
 public static void Register(Event ev, PhxLuaRuntime.LFunction callback, object key)
 {
     Get(ev).AddCallback(key, callback);
 }