Пример #1
0
    // Run this after the bombs are placed
    public void SetBombCount()
    {
        bombCount = 0;

        List <GameObject> neighbours = bs.GetNeighbours(this.xcor, this.ycor);

        foreach (GameObject tile in neighbours)
        {
            TileScript tileScript = tile.GetComponent <TileScript>();
            if (tileScript.mine)
            {
                bombCount += 1;
            }
        }
    }