public Game() { globalComps = new ComponentRegistry(); tickings = new RemovalSafeList <ITicking>(); controllerEnterMessage = new Message <IGameController>(); controllerExitMessage = new Message <IGameController>(); }
public AutoController(Game game) { this.game = game; this.aList = new ActivatableList(); this.dList = new DisposableList(); this.sceneComps = new ComponentRegistry(); }
public static ComponentJanitor NewAndActivate(object component, ComponentRegistry coll, int key) { ComponentJanitor okd = new ComponentJanitor(component, coll, key); okd.Active = true; return(okd); }
public ComponentJanitor(object component, ComponentRegistry registry, int key) { UnityEngine.Debug.Assert(component != null, "Component is null"); UnityEngine.Debug.Assert(registry != null, "Registry is null"); this.component = component; this.reg = registry; this.key = key; }
public void Dispose() { if (disposed) { return; } this.Active = false; this.disposed = true; IDisposable d = component as IDisposable; if (d != null) { d.Dispose(); } component = null; reg = null; key = -1; }