Base class for controllers. Controllers are a convience for encapsulating common per-step functionality.
Inheritance: IDisposable
Ejemplo n.º 1
0
 public void RemoveController(Controllers.Controller controller)
 {
     Box2DXDebug.Assert(_controllerCount > 0);
     if (controller._next != null)
         controller._next._prev = controller._prev;
     if (controller._prev != null)
         controller._prev._next = controller._next;
     if (controller == _controllerList)
         _controllerList = controller._next;
     --_controllerCount;
 }
Ejemplo n.º 2
0
        public Controllers.Controller AddController(Controllers.Controller def)
        {
            def._next = _controllerList;
            def._prev = null;
            if (_controllerList != null)
                _controllerList._prev = def;
            _controllerList = def;
            ++_controllerCount;

            def._world = this;

            return def;
        }