public void RemoveController(Components.Controller ctrl) { if (controls.Contains(ctrl)) { ctrl.GameObject = null; controls.Remove(ctrl); } }
public void AddController(Components.Controller ctrl) { if (!HasController(ctrl.GetType())) { controls.Add(ctrl); ctrl.GameObject = this; ctrl.Init(); } else { throw new Exception("Cannot add two controllers of the same type!"); } }