public override void OnReceiveRemote(bool server, PlayerDeathMessage message) { var playerName = QSBPlayerManager.GetPlayer(message.AboutId).Name; var deathMessage = Necronomicon.GetPhrase(message.EnumValue, message.NecronomiconIndex); DebugLog.ToAll(string.Format(deathMessage, playerName)); }
private void OnClientReceiveMessage(DeathMessage message) { var playerName = PlayerJoin.PlayerNames.TryGetValue(message.SenderId, out var n) ? n : message.PlayerName; var deathMessage = Necronomicon.GetPhrase(message.DeathType); DebugLog.All(string.Format(deathMessage, playerName)); }
private void InitWeapon() { // 책 _spellBook = GameObject.Find("Weapons/SpellBook").GetComponent <SpellBook>(); _spellBook.Init(_characterStats); _necronomicon = GameObject.Find("Weapons/Necronomicon").GetComponent <Necronomicon>(); _necronomicon.Init(_characterStats); grimoire = _spellBook; _IsSpellbook = true; // 텔레포트 _teleport.Init(); }
public override void OnReceiveRemote() { var player = QSBPlayerManager.GetPlayer(From); var playerName = player.Name; var deathMessage = Necronomicon.GetPhrase(Value, NecronomiconIndex); if (deathMessage != null) { DebugLog.ToAll(string.Format(deathMessage, playerName)); } RespawnManager.Instance.OnPlayerDeath(player); }
private PlayerDeathMessage CreateMessage(DeathType type) => new PlayerDeathMessage { AboutId = LocalPlayerId, EnumValue = type, NecronomiconIndex = Necronomicon.GetRandomIndex(type) };
public PlayerDeathMessage(DeathType type) { Value = type; NecronomiconIndex = Necronomicon.GetRandomIndex(type); }