public void RemoveObject(GameObject gameObject) { GameObjects.Remove(gameObject); RemovedGameObjects.Add(gameObject); if (gameObject.ShouldDrawGUI) GameObjectsWithGUI.Remove(gameObject); }
public void AddObject(GameObject gameObject, float x, float y) { AddObject(gameObject, new Vector2(x, y)); }
public void AddObject(GameObject gameObject, Vector2 position) { gameObject.World = this; gameObject.Drawing = DrawWrapper; gameObject.Audio = AudioWrapper; gameObject.Position = position; gameObject.Assets = AssetManager; GameObjects.Add(gameObject); gameObject.Create(); AddedGameObjects.Add(gameObject); if (gameObject.ShouldDrawGUI) GameObjectsWithGUI.Add(gameObject); }
public void AddObject(GameObject gameObject) { AddObject(gameObject, Vector2.Zero); }