public override void OnBehaviourInitialize()
 {
     base.OnBehaviourInitialize();
     this.MissionLobbyComponent  = this.Mission.GetMissionBehaviour <MissionLobbyComponent>();
     this.GameModeBaseClient     = this.Mission.GetMissionBehaviour <MissionMultiplayerGameModeBaseClient>();
     this.NotificationsComponent = this.Mission.GetMissionBehaviour <MultiplayerGameNotificationsComponent>();
     this.RoundController        = this.Mission.GetMissionBehaviour <MultiplayerRoundController>();
     this.WarmupComponent        = this.Mission.GetMissionBehaviour <MultiplayerWarmupComponent>();
     this.TimerComponent         = this.Mission.GetMissionBehaviour <MultiplayerTimerComponent>();
     this.SpawnComponent         = Mission.Current.GetMissionBehaviour <SpawnComponent>();
     this._lastPerkTickTime      = Mission.Current.Time;
 }
 public override void AfterStart()
 {
     this.Clear();
     this._missionLobbyComponent               = this.Mission.GetMissionBehaviour <MissionLobbyComponent>();
     this._mpGameModeBase                      = this.Mission.GetMissionBehaviour <MissionMultiplayerGameModeBaseClient>();
     this._scoreboardSides                     = this._missionLobbyComponent.MissionType == MissionLobbyComponent.MultiplayerGameType.FreeForAll || this._missionLobbyComponent.MissionType == MissionLobbyComponent.MultiplayerGameType.Duel ? MissionScoreboardComponent.ScoreboardSides.OneSide : MissionScoreboardComponent.ScoreboardSides.TwoSides;
     MissionPeer.OnTeamChanged                += new MissionPeer.OnTeamChangedDelegate(this.TeamChange);
     VirtualPlayer.OnPeerComponentPreRemoved  += new Action <VirtualPlayer, PeerComponent>(this.OnPeerComponentPreRemoved);
     NetworkCommunicator.OnPeerComponentAdded += new Action <PeerComponent>(this.OnPeerComponentAdded);
     if (GameNetwork.IsServerOrRecorder && this._mpGameModeBase.RoundComponent != null)
     {
         this._mpGameModeBase.RoundComponent.OnRoundEnding += new Action(this.OnRoundEnding);
     }
     this.LateInitScoreboard();
 }
Beispiel #3
0
 public override void AfterStart()
 {
     GameNetwork.AddNetworkHandler((IUdpNetworkHandler)this);
     this.AddRemoveMessageHandlers(GameNetwork.NetworkMessageHandlerRegisterer.RegisterMode.Add);
     this._gameModeClient = Mission.Current.GetMissionBehaviour <MissionMultiplayerGameModeBaseClient>();
 }
Beispiel #4
0
        public override void OnBehaviourInitialize()
        {
            MissionMultiplayerGameModeBaseClient missionBehaviour = Mission.Current.GetMissionBehaviour <MissionMultiplayerGameModeBaseClient>();

            this._matchInfo.GameType = (missionBehaviour != null ? missionBehaviour.GameType : MissionLobbyComponent.MultiplayerGameType.FreeForAll).ToString();
        }