예제 #1
0
 /// <summary>
 /// Removes the gameobject from the Controller overview, which disables its updated, GUId, and Renderd methods
 /// </summary>
 /// <param name="gameObject">The gameobject to remove</param>
 /// <returns>Returns false if the gameobject is not being updated by the controller, othervise true if removed successfully, BUDDY!</returns>
 internal bool ForgetMe(GameObject gameObject)
 {
     if (_gol.Any(go => go == gameObject))
     {
         _gol.Remove(gameObject);
         return true;
     }
     return false;
 }
예제 #2
0
 /// <summary>
 /// Places the gameobject in the Controller overview, which allows it to be updated, GUId, and Renderd
 /// </summary>
 /// <param name="gameObject">The gameobject to controll</param>
 /// <returns>Returns false if the gameobject is allready being updated by the controller, othervise true</returns>
 internal bool UpdateMe(GameObject gameObject)
 {
     if (_gol.Any(go => go == gameObject)) { return false; }
     _gol.Add(gameObject);
     return true;
 }
예제 #3
0
 internal void _setGameObject(GameObject gameObject)
 {
     if (_gameObject != null)
         throw new System.Exception("Cant set gameObject twice");
     _gameObject = gameObject;
 }
예제 #4
0
 public static void Destroy(GameObject gameObject)
 {
     Controllers.GameObjectController.ForgetMe(gameObject);
     gameObject.Dispose();
     gameObject = null;
 }