Пример #1
0
    public void AssignScore(DataCodes pResultCode)
    {
        switch (pResultCode)
        {
        case DataCodes.P1_ROUND_WON:
            if (Client.PlayerNum == 1)
            {
                Score += 1;
                ResultText.SetText("YOU WIN");
            }
            else
            {
                ResultText.SetText("YOU LOSE");
            }
            break;

        case DataCodes.P1_ROUND_LOST:
            if (Client.PlayerNum == 2)
            {
                Score += 1;
                ResultText.SetText("YOU WIN");
            }
            else
            {
                ResultText.SetText("YOU LOSE");
            }
            break;

        case DataCodes.ROUND_TIE:
            break;
        }
        ResultText.gameObject.SetActive(true);
    }