Exemple #1
0
        public void ScoreUpdate(RoundScoreUpdatedEvent e, RoundNode node, [JoinByBattle] BattleWithLimitNode battleWithLimit, [JoinByBattle] IndicatorNode indicator, [JoinByBattle] ICollection <TeamNode> teams)
        {
            int redScore  = 0;
            int blueScore = 0;

            foreach (TeamNode node2 in teams)
            {
                TeamColor teamColor = node2.teamColor.TeamColor;
                if (teamColor == TeamColor.RED)
                {
                    redScore = node2.teamScore.Score;
                    continue;
                }
                if (teamColor == TeamColor.BLUE)
                {
                    blueScore = node2.teamScore.Score;
                }
            }
            indicator.teamBattleScoreIndicator.UpdateScore(blueScore, redScore, battleWithLimit.scoreLimit.ScoreLimit);
        }
Exemple #2
0
 public void InitIndicator(NodeAddedEvent e, BattleWithLimitNode battleWithLimit, [Context, JoinByBattle] RoundNode round, [Context, JoinByBattle] IndicatorNode indicator)
 {
     indicator.teamBattleScoreIndicator.UpdateScore(battleWithLimit.battleScore.ScoreBlue, battleWithLimit.battleScore.ScoreRed, battleWithLimit.scoreLimit.ScoreLimit);
 }