Пример #1
0
 public void RemoveObject(GameObject gameObject)
 {
     GameObjects.Remove(gameObject);
     RemovedGameObjects.Add(gameObject);
     if (gameObject.ShouldDrawGUI)
         GameObjectsWithGUI.Remove(gameObject);
 }
Пример #2
0
 public void AddObject(GameObject gameObject, float x, float y)
 {
     AddObject(gameObject, new Vector2(x, y));
 }
Пример #3
0
 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);
 }
Пример #4
0
 public void AddObject(GameObject gameObject)
 {
     AddObject(gameObject, Vector2.Zero);
 }