Esempio n. 1
0
 //When sequence of cells completed we create "highlight" animation effect
 public void ShowWinSequence(CheckWinResult result)
 {
     if (result != null)
     {
         StartCoroutine(CorShowWinSequence(result.winSequence));
     }
 }
Esempio n. 2
0
        private void OnWinResult(EventData eventData)
        {
            WinResultEventData winResultEventData = eventData as WinResultEventData;

            if (winResultEventData.result != null)
            {
                m_WinResult = winResultEventData.result;
            }
        }
Esempio n. 3
0
        private bool CheckToWin(out CheckWinResult winResult)
        {
            winResult = null;

            if (countOfEmptyCells == 0)
            {
                winResult = new CheckWinResult(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, CellState.empty, RoundResultType.deadHeat);
            }

            foreach (var sequence in m_WinSequences)
            {
                if (CheckToWinSequence(sequence))
                {
                    winResult = new CheckWinResult(sequence, m_Cells[sequence[0]].state, CellState2RoundResultType(m_Cells[sequence[0]].state));
                    return(true);
                }
            }
            return(false);
        }
Esempio n. 4
0
 public WinResultEventData(CheckWinResult result)
 {
     this.result = result;
 }