Esempio n. 1
0
 private void OnBoardTileSelected(BattleBoardTile tile)
 {
     // TODO handle this tile being selected
     // depending on "battle state" we may be selecting an ally unit
     // possibly selecting a target or a space to move to
     Debug.Log(CurrentBattlePlayer.DisplayName + " selected a tile");
     ProgressTurn();
 }
Esempio n. 2
0
    private void Start()
    {
        // create the tiles
        for (int c = 0; c < columns; ++c)
        {
            for (int r = 0; r < rows; ++r)
            {
                BattleBoardTile tile = Instantiate(tileSource, transform);
                tile.transform.localPosition = new Vector3(c * 1.1f, 0, r * 1.1f);
                tile.onTileSelect           += OnTileSelected;
            }
        }

        // adjust the board to position "centered" in front of the camera
        transform.localPosition = Vector3.left * (columns - 1) / 2.0f;
    }
Esempio n. 3
0
 private void OnTileSelected(BattleBoardTile tile)
 {
     BroadcastMessage("SetUnselected", SendMessageOptions.DontRequireReceiver);
     tile.SetSelected();
     onBoardTileSelected(tile);
 }