Пример #1
0
 void Decay()
 {
     for (int i = 0; i < numTilesToDecayPerTurn; i++)
     {
         int      rand = Random.Range(0, interactableTileHolder.childCount);
         GameTile gt   = interactableTileHolder.GetChild(rand).GetComponent <GameTile>();
         if (gt.myOwner == null)
         {
             gt.DestroyTile();
         }
         interactableTileCount = interactableTileHolder.childCount;
         // Debug.Log("Tally one deleted");
     }
 }
Пример #2
0
    /// <summary>
    /// Destroys the tile at the position.
    /// </summary>
    /// <param name="pos"></param>
    public void DestroyTileAtPosition(Vector3 pos)
    {
        GameTile t = GetTileAtPosition(pos);

        t.DestroyTile();
    }