// OnDie protected override void OnDie() { base.OnDie(); // this.enabled = false; PlayerCamera.PlayerDie(); HudElements.PlayerDie(); FirstPersonController.PlayerDie(); FirstPersonWeaponSway[] tmpFPWeapSways = this.GetComponentsInChildren <FirstPersonWeaponSway>(); foreach (FirstPersonWeaponSway fpWSway in tmpFPWeapSways) { fpWSway.enabled = false; } GameObject bAnimGO = this.GetComponentInChildren <BodyAnimation>().gameObject; if (bAnimGO != null) { bAnimGO.SetActive(false); } // Show menu after die. ASKInputManager.PlayerDie(); }
// SetActive public static void SetActive(bool value) { if (value) { ASKInputManager.UnblockCursor(); } else { ASKInputManager.BlockCursor(); } instance.gameObject.SetActive(value); }
// UnPause public void UnPause() { ASKInputManager.Pause(); }