Esempio n. 1
0
    public void ShowGameEnded()
    {
        DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("LblLiveBingo"),
                                 UtilMgr.GetLocalText("StrBingoEnded"), DialogueMgr.DIALOGUE_TYPE.Alert, null);

        mResultEvent = new GameResultEvent(ReceivedGameResult);
        NetMgr.GameResult(mResultEvent);
    }
        //оповещает о результате игры
        void SendGameResult()
        {
            MultiplayerResult gameResult;

            //определяем результят игры
            if (MultiplayerInfo.myScore > MultiplayerInfo.opponentScore)
            {
                gameResult = MultiplayerResult.WIN;                 //победа
                AudioManager.Instance.Play(StaticPrm.SOUND_WIN_GAME);
            }
            else if (MultiplayerInfo.myScore < MultiplayerInfo.opponentScore)
            {
                gameResult = MultiplayerResult.LOSE;                 //проигрыш
                AudioManager.Instance.Play(StaticPrm.SOUND_LOSS_GAME);
            }
            else
            {
                gameResult = MultiplayerResult.DRAW;                 //ничья
                AudioManager.Instance.Play(StaticPrm.SOUND_DRAW_GAME);
            }

            //отсылаем сообщение с результатом игры
            GameResultEvent?.Invoke(gameResult);
        }
 public Task ExecuteAsync(GameResultEvent @event)
 {
     return(_bettingClient.ApiResultPostAsync(new SetActualResultCommand {
         GameId = @event.GameId, ScoreTeamA = @event.ScoreTeamA, ScoreTeamB = @event.ScoreTeamB
     }));
 }
Esempio n. 4
0
    public void ShowGameEnded()
    {
        DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("LblLiveBingo"),
                                 UtilMgr.GetLocalText("StrBingoEnded"), DialogueMgr.DIALOGUE_TYPE.Alert, null);

        mResultEvent = new GameResultEvent(ReceivedGameResult);
        NetMgr.GameResult(mResultEvent);
    }