Example #1
0
 /// <summary>
 /// Destroy's this tile spot's GameObjects.
 /// </summary>
 public void DestroyGameObjects()
 {
     for (int i = 0; i < Gos.Count; i++)
     {
         Gos[i].Destroy();
     }
     Gos.Clear();
 }
Example #2
0
 /// <summary>
 /// Creates GameObjects for the tile spot.
 /// </summary>
 /// <param name="position">Tile spot position</param>
 public void CreateGameObjects(Point position)
 {
     DestroyGameObjects();
     for (int i = 0; i < TileTemplates.Count; i++)
     {
         Func <Vector2, GameObject> f = scene.TileSet[TileTemplates[i].ToString()];
         Gos.Add(f.Invoke(new Vector2(position.X, position.Y)));
     }
 }