Esempio n. 1
0
        // 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();
        }
Esempio n. 2
0
        // SetActive
        public static void SetActive(bool value)
        {
            if (value)
            {
                ASKInputManager.UnblockCursor();
            }
            else
            {
                ASKInputManager.BlockCursor();
            }

            instance.gameObject.SetActive(value);
        }
Esempio n. 3
0
 // UnPause
 public void UnPause()
 {
     ASKInputManager.Pause();
 }