public override void OnGoldAmountChangedForRepresentative(
     MissionRepresentativeBase representative,
     int goldAmount)
 {
     if (representative == null || this.MissionLobbyComponent.CurrentMultiplayerState == MissionLobbyComponent.MultiplayerGameState.Ending)
     {
         return;
     }
     representative.UpdateGold(goldAmount);
     this.ScoreboardComponent.PlayerPropertiesChanged(representative.MissionPeer);
 }
Пример #2
0
        public override void OnGoldAmountChangedForRepresentative(
            MissionRepresentativeBase representative,
            int goldAmount)
        {
            if (representative == null)
            {
                return;
            }
            MissionPeer component = representative.GetComponent <MissionPeer>();

            if (component == null)
            {
                return;
            }
            representative.UpdateGold(goldAmount);
            this._scoreboardComponent.PlayerPropertiesChanged(component);
            if (!this.IsGameModeUsingGold || !this.IsRoundInProgress || (component.Team == null || component.Team.Side == BattleSideEnum.None))
            {
                return;
            }
            this.UpdateTeamPowerBasedOnGold(component.Team);
        }