private void PlaySkullLaughing(TypeOfDeath typeOfDeath) { if (typeOfDeath.Equals(TypeOfDeath.Bullet)) { Play(SkullLaughing); } }
private void StopHeartBeat(TypeOfDeath _) { if (PlayingHeartbeat) { HeartBeatAudioSource.Stop(); PlayingHeartbeat = false; } }
public static void PlayerDied(int bulletOwnerID, TypeOfDeath typeOfDeath) { //TODO: 9000 Implement so see kill score and etc... so send who killed who Packet packet = new Packet((int)ClientPackets.playerDied); packet.Write(bulletOwnerID); packet.Write((int)typeOfDeath); SendTCPPacket(packet); }
public static void PlayerDied(byte bulletOwnerID, TypeOfDeath typeOfDeath) { using (Packet packet = new Packet((byte)ClientPackets.playerDied)) { packet.Write(bulletOwnerID); packet.Write((byte)typeOfDeath); SendTCPPacket(packet); } }
public void PlayDied(TypeOfDeath typeOfDeath) { if (typeOfDeath == TypeOfDeath.Bullet) { Play(DieBullet); } else if (typeOfDeath == TypeOfDeath.Fall) { Play(DieFall); } }
public void PlayDeath(TypeOfDeath death) { _transitionDone = false; _death = death; if (death.Equals(TypeOfDeath.Ghost)) { _audioManager.PlaySound(sound_path_ghost, 0.6f, 0.0f, 0.0f); } if (death.Equals(TypeOfDeath.Train)) { _audioManager.PlaySound(sound_path_train_passes, 0.6f, 0.0f, 0.0f); } BoostHeartbeat(0.4f); }
public static void PlayerDied(Packet packet) { int playerKilledID = packet.ReadInt(); int bulletOwnerID = packet.ReadInt(); TypeOfDeath typeOfDeath = (TypeOfDeath)packet.ReadInt(); KillFeedUI.Instance.AddKillFeedEntry(playerKilledID, bulletOwnerID); if (playerKilledID != bulletOwnerID) { ScoreboardManager.Instance.AddKill(bulletOwnerID); } ScoreboardManager.Instance.AddDeath(playerKilledID); GameManager.PlayerDictionary[playerKilledID].PlayerDied(typeOfDeath); }
public AmbianceManager() { _heartbeat = 1.0f; _currentZone = AmbianceZone.Outside; _nextZone = _currentZone; _switching = false; _audioManager = YnG.AudioManager; _currentPace = HB_pace.speed1; _guideSound = GuideSound.None; _lastTick = 0; _lastGuide = 0; _death = TypeOfDeath.None; _transitionDone = false; _muteHeart = false; PlayAmbianceMusic(); PlayHeartbeat(); }
public static void PlayerDied(Packet packet) { try { byte playerKilledID = packet.ReadByte(); byte bulletOwnerID = packet.ReadByte(); TypeOfDeath typeOfDeath = (TypeOfDeath)packet.ReadByte(); KillFeedUI.Instance.AddKillFeedEntry(playerKilledID, bulletOwnerID); if (playerKilledID != bulletOwnerID) { ScoreboardManager.Instance.AddKill(bulletOwnerID); } ScoreboardManager.Instance.AddDeath(playerKilledID); GameManager.PlayerDictionary[playerKilledID].PlayerDied(typeOfDeath); } catch (Exception e) { OutputPacketError(e); } }
public void Update(GameTime gameTime) { if (!_death.Equals(TypeOfDeath.None)) { if (gameTime.TotalGameTime.TotalMilliseconds - _transitionTimer > 5 * 1000) { _transitionDone = true; _death = TypeOfDeath.None; } if (gameTime.TotalGameTime.TotalMilliseconds - _lastTick > _heartbeat * 1000) { _lastTick = gameTime.TotalGameTime.TotalMilliseconds; if (!_muteHeart) { PlayHeartbeat(); } } } else { _transitionTimer = gameTime.TotalGameTime.TotalMilliseconds; if (_guideSound.Equals(GuideSound.None)) { _lastGuide = gameTime.TotalGameTime.TotalMilliseconds; } else if (gameTime.TotalGameTime.TotalMilliseconds - _lastGuide > 20 * 1000) { _lastGuide = gameTime.TotalGameTime.TotalMilliseconds; PlayGuide(); } if (gameTime.TotalGameTime.TotalMilliseconds - _lastTick > _heartbeat * 1000) { _lastTick = gameTime.TotalGameTime.TotalMilliseconds; if (_heartbeat < 0.4f) { _heartbeat = 0.4f; } if (_heartbeat < 0.8f) { _heartbeat += 0.01f; } HB_pace newPace = GetPace(); if (_currentPace.Equals(newPace)) { _currentPace = newPace; } if (!_muteHeart) { PlayHeartbeat(); } } if (_switching) { if (!_nextZone.Equals(_currentZone)) { if (_audioManager.MusicVolume > 0f) { _audioManager.MusicVolume -= 0.01f; } if (_audioManager.MusicVolume == 0f) { _currentZone = _nextZone; PlayAmbianceMusic(); } } else { float max_volume = 0.5f; if (_currentZone.Equals(AmbianceZone.Stairs) || _currentZone.Equals(AmbianceZone.Room)) { max_volume = 0.4f; } if (_audioManager.MusicVolume < max_volume) { _audioManager.MusicVolume += 0.01f; } if (_audioManager.MusicVolume == max_volume) { _switching = false; } } } } }
private void PlayerCantMoveAndCantBeHit(TypeOfDeath typeOfDeath) { Hitbox.enabled = false; FreezeMotion(); }
public virtual void DieAnimation(TypeOfDeath typeOfDeath) { Anim.SetTrigger("Die"); }
public void PlayerDied(TypeOfDeath typeOfDeath) => OnPlayerDeath?.Invoke(typeOfDeath);
public void Disable(TypeOfDeath typeOfDeath) => CanShootAndAim = false;
public void PlayerDied(int playerKilledDiedID, int bulletOwnerID, TypeOfDeath typeOfDeath) { ClientSend.PlayerDied(bulletOwnerID, typeOfDeath); PlayerDictionary[playerKilledDiedID].PlayerDied(typeOfDeath); KillFeedUI.Instance.AddKillFeedEntry(playerKilledDiedID, bulletOwnerID); }