public void LoopOff(int loopType) { if (_actions[loopType] != null) { EngineLoopManager.GetEngineLoop(loopType).Remove(this); _actions[loopType] = null; } }
public void LoopOn(int loopType, Action action) { if (dropped) { throw new Exception("Dropped"); } if (_actions[loopType] == null) { EngineLoopManager.GetEngineLoop(loopType).AddToLast(this); _actions[loopType] = action; } }
public void LoopOn(int loopType, Action action, bool callNow = false) { if (dropped) { throw new Exception("Dropped"); } if (_actions[loopType] == null) { callWhenAdded = callNow; EngineLoopManager.GetEngineLoop(loopType).AddToLast(this); _actions[loopType] = action; } }