LogicTree.hx 657 B

123456789101112131415161718192021222324252627282930
  1. package arm.node;
  2. class LogicTree extends iron.Trait {
  3. public var loopBreak = false; // Trigger break from loop nodes
  4. public function new() {
  5. super();
  6. }
  7. public function add() {}
  8. var paused = false;
  9. public function pause() {
  10. if (paused) return;
  11. paused = true;
  12. if (_update != null) for (f in _update) iron.App.removeUpdate(f);
  13. if (_lateUpdate != null) for (f in _lateUpdate) iron.App.removeLateUpdate(f);
  14. }
  15. public function resume() {
  16. if (!paused) return;
  17. paused = false;
  18. if (_update != null) for (f in _update) iron.App.notifyOnUpdate(f);
  19. if (_lateUpdate != null) for (f in _lateUpdate) iron.App.notifyOnLateUpdate(f);
  20. }
  21. }