Ejemplo n.º 1
0
 private void AddNewCreatures()
 {
     foreach (var newSimObject in NewSimObjects)
     {
         SimObjects.Add(newSimObject);
     }
     NewSimObjects.Clear();
 }
Ejemplo n.º 2
0
 public void AddObstacle(int xPos, int yPos)
 {
     SimObjects.Add(new Obstacle(xPos, yPos, this));
 }
Ejemplo 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);
Ejemplo n.º 4
0
 public void AddPlant(int energy, int xPos, int yPos)
 {
     SimObjects.Add(new Plant(energy, xPos, yPos, this));
 }
Ejemplo 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);
Ejemplo 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);