public override bool Equals(object other) { if (other == null) { return(false); } DanceBattleScoreData danceBattleScoreData = other as DanceBattleScoreData; if (danceBattleScoreData == null) { return(false); } return(danceBattleScoreData.StartTimeInSeconds == StartTimeInSeconds); }
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); } }
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 bool onTurnEndEvent(DanceBattleEvents.TurnEnd evt) { changeControlState(ControlsState.Disabled); scoreData = evt.ScoreData; return(false); }
protected override void awake() { danceBattleScoreData = new DanceBattleScoreData(); danceBattleTurnData = new DanceBattleTurnData(); danceBattleTurnOutcomeMoveData = new DanceBattleTurnOutcomeMoveData(); }