public override void UpdateLights(EffectFrame frame, GameState new_game_state) { if (new_game_state is GameState_PD2) { _game_state = new_game_state; GameState_PD2 gs = (new_game_state as GameState_PD2); try { SetPlayerState(gs.Players.LocalPlayer.State); SetHealth(gs.Players.LocalPlayer.Health.Current); SetHealthMax(gs.Players.LocalPlayer.Health.Max); SetArmor(gs.Players.LocalPlayer.Armor.Current); SetArmorMax(gs.Players.LocalPlayer.Armor.Max); SetClip(gs.Players.LocalPlayer.Weapons.SelectedWeapon.Current_Clip); SetClipMax(gs.Players.LocalPlayer.Weapons.SelectedWeapon.Max_Clip); SetSuspicion(gs.Players.LocalPlayer.SuspicionAmount); SetLevelPhase(gs.Level.Phase); SetDownTime(gs.Players.LocalPlayer.DownTime); SetSwanSong(gs.Players.LocalPlayer.IsSwanSong); SetFlashbangAmount(gs.Players.LocalPlayer.FlashAmount); SetNoReturnTimeleft(gs.Level.NoReturnTime); SetGameState(gs.Game.State); UpdateLights(frame); } catch (Exception e) { Global.logger.LogLine("Exception during OnNewGameState. Error: " + e, Logging_Level.Error); Global.logger.LogLine(gs.ToString(), Logging_Level.None); } } }
public override void UpdateLights(EffectFrame frame, IGameState new_game_state) { if (new_game_state is GameState_PD2) { _game_state = new_game_state; GameState_PD2 gs = (new_game_state as GameState_PD2); try { UpdateLights(frame); } catch (Exception e) { Global.logger.LogLine("Exception during OnNewGameState. Error: " + e, Logging_Level.Error); Global.logger.LogLine(gs.ToString(), Logging_Level.None); } } }