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);
 }
 protected override void HandleLateNewClientAfterLoadingFinished(NetworkCommunicator networkPeer)
 {
     if (!this.GameModeBaseClient.IsGameModeUsingGold)
     {
         return;
     }
     foreach (NetworkCommunicator networkPeer1 in GameNetwork.NetworkPeers)
     {
         if (networkPeer1 != networkPeer)
         {
             MissionRepresentativeBase component = networkPeer1.GetComponent <MissionRepresentativeBase>();
             if (component != null)
             {
                 GameNetwork.BeginModuleEventAsServer(networkPeer);
                 GameNetwork.WriteMessage((GameNetworkMessage) new SyncGoldsForSkirmish(component.Peer, component.Gold));
                 GameNetwork.EndModuleEventAsServer();
             }
         }
     }
 }
Exemplo n.º 3
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);
        }
 public override void OnGoldAmountChangedForRepresentative(
     MissionRepresentativeBase representative,
     int goldAmount)
 {
 }
 public abstract void OnGoldAmountChangedForRepresentative(
     MissionRepresentativeBase representative,
     int goldAmount);