예제 #1
0
파일: Game.cs 프로젝트: ragibson/MedUCate
    public void answerClicked(int i)
    {
        currentTriviaRound.answerChosen(i);

        if (gameLogic.currentlyNetworking())
        {
            if (gameLogic.isServer)
            {
                gameLogic.ourGamestate.RpcUpdateServerAnswerCorrect(currentTriviaRound.correct);
                gameLogic.ourGamestate.RpcUpdateServerAnswerTime(currentTriviaRound.answerTime);
            }
            else
            {
                gameLogic.ourGamestate.CmdUpdateClientAnswerCorrect(currentTriviaRound.correct);
                gameLogic.ourGamestate.CmdUpdateClientAnswerTime(currentTriviaRound.answerTime);
            }
        }
    }