コード例 #1
0
        public override void OnReceiveRemote(PlayerDeathMessage message)
        {
            var playerName   = PlayerRegistry.GetPlayer(message.AboutId).Name;
            var deathMessage = Necronomicon.GetPhrase(message.DeathType);

            DebugLog.ToAll(string.Format(deathMessage, playerName));
        }
コード例 #2
0
        public override void OnReceiveRemote(ToggleMessage message)
        {
            var player = PlayerRegistry.GetPlayer(message.AboutId);

            player.UpdateState(State.ProbeLauncher, message.ToggleValue);
            player.ProbeLauncher?.ChangeEquipState(message.ToggleValue);
        }
コード例 #3
0
        public override void OnReceiveRemote(ToggleMessage message)
        {
            var player = PlayerRegistry.GetPlayer(message.AboutId);

            player.UpdateState(State.ProbeActive, message.ToggleValue);
            player.Probe?.SetState(message.ToggleValue);
        }
コード例 #4
0
        public override void OnReceiveRemote(ToggleMessage message)
        {
            var player = PlayerRegistry.GetPlayer(message.AboutId);

            player.UpdateState(State.Signalscope, message.ToggleValue);
            player.Signalscope?.ChangeEquipState(message.ToggleValue);
        }
コード例 #5
0
        public override void OnReceiveRemote(ToggleMessage message)
        {
            var player = PlayerRegistry.GetPlayer(message.AboutId);

            player.UpdateState(State.Flashlight, message.ToggleValue);
            player.FlashLight?.UpdateState(message.ToggleValue);
        }
コード例 #6
0
        public override void OnReceiveRemote(PlayerLeaveMessage message)
        {
            var playerName = PlayerRegistry.GetPlayer(message.AboutId).Name;

            DebugLog.ToAll($"{playerName} disconnected.", MessageType.Info);
            PlayerRegistry.GetPlayer(message.AboutId).HudMarker?.Remove();
            PlayerRegistry.RemovePlayer(message.AboutId);
            message.NetIds.ToList().ForEach(netId => QSBNetworkManager.Instance.CleanupNetworkBehaviour(netId));
        }
コード例 #7
0
        public override void OnReceiveLocal(PlayerJoinMessage message)
        {
            var player = PlayerRegistry.GetPlayer(PlayerRegistry.LocalPlayerId);

            player.Name = message.PlayerName;
            var text = $"Connected to server as {player.Name}.";

            DebugLog.ToAll(text, MessageType.Info);
        }
コード例 #8
0
        public override void OnReceiveRemote(PlayerJoinMessage message)
        {
            var player = PlayerRegistry.GetPlayer(message.AboutId);

            player.Name = message.PlayerName;
            var text = $"{player.Name} joined!";

            DebugLog.ToAll(text, MessageType.Info);
        }
コード例 #9
0
 public override void OnServerReceive(ToggleMessage message)
 {
     PlayerRegistry.GetPlayer(message.AboutId).IsReady = message.ToggleValue;
     PlayerState.LocalInstance.Send();
 }