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)); }
public override void OnReceiveRemote(ToggleMessage message) { var player = PlayerRegistry.GetPlayer(message.AboutId); player.UpdateState(State.ProbeLauncher, message.ToggleValue); player.ProbeLauncher?.ChangeEquipState(message.ToggleValue); }
public override void OnReceiveRemote(ToggleMessage message) { var player = PlayerRegistry.GetPlayer(message.AboutId); player.UpdateState(State.ProbeActive, message.ToggleValue); player.Probe?.SetState(message.ToggleValue); }
public override void OnReceiveRemote(ToggleMessage message) { var player = PlayerRegistry.GetPlayer(message.AboutId); player.UpdateState(State.Signalscope, message.ToggleValue); player.Signalscope?.ChangeEquipState(message.ToggleValue); }
public override void OnReceiveRemote(ToggleMessage message) { var player = PlayerRegistry.GetPlayer(message.AboutId); player.UpdateState(State.Flashlight, message.ToggleValue); player.FlashLight?.UpdateState(message.ToggleValue); }
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)); }
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); }
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); }
public override void OnServerReceive(ToggleMessage message) { PlayerRegistry.GetPlayer(message.AboutId).IsReady = message.ToggleValue; PlayerState.LocalInstance.Send(); }