/// <summary> /// Destroys game object. /// </summary> /// <param name="obj">Game object.</param> public static void Destroy(GameObj obj) { if (!_destroyedGameObjects.Contains(obj)) { _destroyedGameObjects.Add(obj); obj.Destroyed = true; if (obj.Active) { obj.Destroy(); } } }
/// <summary> /// Adds object to object list. /// </summary> /// <param name="obj"></param> public static void AddObject(GameObj obj) { _newGameObjects.Add(obj); }