コード例 #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
ファイル: gameComponent.cs プロジェクト: reelgood/rg-engine
 internal void _setGameObject(GameObject gameObject)
 {
     if (_gameObject != null)
         throw new System.Exception("Cant set gameObject twice");
     _gameObject = gameObject;
 }
コード例 #4
0
ファイル: GameObject.cs プロジェクト: reelgood/rg-engine
 public static void Destroy(GameObject gameObject)
 {
     Controllers.GameObjectController.ForgetMe(gameObject);
     gameObject.Dispose();
     gameObject = null;
 }