示例#1
0
文件: Scene.cs 项目: randomcrab/SE
 /// <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();
 }
示例#2
0
文件: Scene.cs 项目: randomcrab/SE
 /// <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)));
     }
 }