Exemplo n.º 1
0
 private void AddNewCreatures()
 {
     foreach (var newSimObject in NewSimObjects)
     {
         SimObjects.Add(newSimObject);
     }
     NewSimObjects.Clear();
 }
Exemplo n.º 2
0
 public void AddObstacle(int xPos, int yPos)
 {
     SimObjects.Add(new Obstacle(xPos, yPos, this));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Add a new obstacle to the SimObjects list
 /// </summary>
 /// <param name="obstacle">Obstacle object</param>
 public void AddObstacle(Obstacle obstacle) => SimObjects.Add(obstacle);
Exemplo n.º 4
0
 public void AddPlant(int energy, int xPos, int yPos)
 {
     SimObjects.Add(new Plant(energy, xPos, yPos, this));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Add a new plant to the SimObjects list
 /// </summary>
 /// <param name="plant">Plant object</param>
 public void AddPlant(Plant plant) => SimObjects.Add(plant);
Exemplo n.º 6
0
 /// <summary>
 /// Add a new creature to the SimObjects list
 /// </summary>
 /// <param name="creature">Creature object</param>
 public void AddCreature(Creature creature) => SimObjects.Add(creature);