Esempio n. 1
0
    protected void SendPick(int index)
    {
        TileSelectedMsg msg = new TileSelectedMsg
        {
            SelectedIndex = index
        };

        Messenger.GetInstance().BroadCastMessage(msg);
    }
Esempio n. 2
0
    private void WaitForPick(Message msg)
    {
        TileSelectedMsg tileSelected = msg as TileSelectedMsg;

        lastSelectedTile = tileSelected.SelectedIndex;
        TileMB.TileState tileOwner = playerOne ? TileMB.TileState.PLAYER1 : TileMB.TileState.PLAYER2;
        gameBoard.SelectTile(lastSelectedTile, tileOwner);

        Debug.Log(string.Format("Tile {0} Was Selected", lastSelectedTile));
        SwitchState("Evaluate");

        gameBoard.EnablePicks(false);
    }
Esempio n. 3
0
    private IEnumerator SelectTilesCoroutine(DebugSettings settings)
    {
        WaitForSeconds delayBetweenMoves = new WaitForSeconds(1f / settings.playBackSpeed);

        int[] moves = settings.tileSelections;
        for (int i = 0; i < moves.Length; i++)
        {
            TileSelectedMsg msg = new TileSelectedMsg();
            msg.SelectedIndex = moves[i];
            Messenger.GetInstance().BroadCastMessage(msg);

            yield return(delayBetweenMoves);
        }
    }
Esempio n. 4
0
 private void AttempSelection()
 {
     if (selectedState != TileState.OPEN)
     {
         Debug.Log("This Space Is Taken!");
     }
     else
     {
         TileSelectedMsg msg = new TileSelectedMsg
         {
             SelectedIndex = tileIndex
         };
         Messenger.GetInstance().BroadCastMessage(msg);
     }
 }