public static void AddGameLoopCallback(GameLoopHook p_hook, GameLoopCallback p_gameLoopCallback) { if (!GameSequencer.ContainsKey(p_hook)) { GameSequencer[p_hook] = new List <GameLoopCallback>(); } List <GameLoopCallback> p_involvedHookCallback = GameSequencer[p_hook]; p_involvedHookCallback.Add(p_gameLoopCallback); p_involvedHookCallback.Sort((GameLoopCallback p1, GameLoopCallback p2) => { return(p1.GameLoopPriority.CompareTo(p2.GameLoopPriority)); }); }
public static void RemoveGameLoopCallback(GameLoopHook p_hook, GameLoopCallback p_gameLoopCallback) { GameSequencer[p_hook].Remove(p_gameLoopCallback); }