コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 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();
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 private PlayerDeathMessage CreateMessage(DeathType type) => new PlayerDeathMessage
 {
     AboutId           = LocalPlayerId,
     EnumValue         = type,
     NecronomiconIndex = Necronomicon.GetRandomIndex(type)
 };
コード例 #6
0
 public PlayerDeathMessage(DeathType type)
 {
     Value             = type;
     NecronomiconIndex = Necronomicon.GetRandomIndex(type);
 }