Beispiel #1
0
 protected override void endGame(Dictionary <long, int> playerSessionIdToPlacement)
 {
     if (playerSessionIdToPlacement.ContainsKey(localPlayerSessionId))
     {
         this.playerSessionIdToPlacement = playerSessionIdToPlacement;
         Content.LoadAsync(onEndGamePopupLoadComplete, endGamePopupContentKey);
         if (scoreData == null)
         {
             scoreData            = new DanceBattleScoreData();
             scoreData.Team1Score = 0f;
             scoreData.Team2Score = 0f;
         }
         DanceBattleUtils.LogGameEndBI((!(scoreData.Team1Score > scoreData.Team2Score)) ? 1 : 0);
     }
 }
Beispiel #2
0
        private void handleScoreDataUpdated(DanceBattleMmoItem item)
        {
            if (string.IsNullOrEmpty(item.getScores()))
            {
                return;
            }
            DanceBattleScoreData scoreDataFromMmoItem = getScoreDataFromMmoItem(item);

            if (!danceBattleScoreData.Equals(scoreDataFromMmoItem))
            {
                danceBattleScoreData = scoreDataFromMmoItem;
                if (ScoresUpdatedAction != null)
                {
                    ScoresUpdatedAction(danceBattleScoreData);
                }
            }
        }
 private void onScoresUpdated(DanceBattleScoreData scoreData)
 {
     if (currentState == DanceBattleVisualsState.PerformingMoves)
     {
         currentScoreData   = scoreData;
         lastScoreRedDelta  = scoreData.Team2Score - lastScoreRed;
         lastScoreRed       = scoreData.Team2Score;
         lastScoreBlueDelta = scoreData.Team1Score - lastScoreBlue;
         lastScoreBlue      = scoreData.Team1Score;
         if (localPlayerIsInGame)
         {
             DanceBattleUtils.LogRoundEndBI(currentTurnData.RoundNum, (localPlayerTeamId == 0) ? lastScoreBlueDelta : lastScoreRedDelta, localPlayerTeamId);
         }
         RedScoreBar.SetBarValue(scoreData.Team2Score / (float)danceBattleDefinition.NumberOfRounds);
         BlueScoreBar.SetBarValue(scoreData.Team1Score / (float)danceBattleDefinition.NumberOfRounds);
         setState(DanceBattleVisualsState.RoundResults);
         dispatcher.DispatchEvent(new DanceBattleEvents.TurnEnd(this, currentTurnData, currentScoreData));
     }
 }
Beispiel #4
0
 private bool onTurnEndEvent(DanceBattleEvents.TurnEnd evt)
 {
     changeControlState(ControlsState.Disabled);
     scoreData = evt.ScoreData;
     return(false);
 }
Beispiel #5
0
 public TurnEnd(DanceBattleVisualsController danceBattleVisualsController, DanceBattleTurnData turnData, DanceBattleScoreData scoreData)
 {
     DanceBattleVisualsController = danceBattleVisualsController;
     TurnData  = turnData;
     ScoreData = scoreData;
 }
Beispiel #6
0
 protected override void awake()
 {
     danceBattleScoreData           = new DanceBattleScoreData();
     danceBattleTurnData            = new DanceBattleTurnData();
     danceBattleTurnOutcomeMoveData = new DanceBattleTurnOutcomeMoveData();
 }