public void Die() { PlayerWeapons.HideWeapon(); PlayerWeapons.playerActive = false; this.GetComponent <CharacterMotorDB>().canControl = false; BroadcastMessage("Death"); BroadcastMessage("Freeze"); LockCursor.HardUnlock(); dead = true; }
//Locks player to ladder public IEnumerator LockPlayer() { if (GunScript.takingOut || GunScript.puttingAway || ladder) { yield break; } if (PlayerWeapons.PW.weapons[PlayerWeapons.PW.selectedWeapon]) { temp = PlayerWeapons.PW.weapons[PlayerWeapons.PW.selectedWeapon].GetComponent <GunScript>().gunActive; } else { temp = true; } player.SendMessage("StandUp"); belowHeight = true; CharacterMotorDB.paused = true; SmartCrosshair.draw = false; PlayerWeapons.playerActive = false; DBStoreController.canActivate = false; PlayerWeapons.HideWeapon(); val = (player.position.y - transform.position.y) / (exitPos.position.y - transform.position.y); RotateTo(player, enterPos.eulerAngles, moveSpeed, false); RotateTo(PlayerWeapons.weaponCam.transform, Vector3.zero, moveSpeed, true); player.GetComponent <MouseLookDBJS>().individualFreeze = true; PlayerWeapons.weaponCam.GetComponent <MouseLookDBJS>().individualFreeze = true; yield return(MoveToStart(player, enterPos.position, moveSpeed)); player.GetComponent <MouseLookDBJS>().LockIt(60, 60); PlayerWeapons.weaponCam.GetComponent <MouseLookDBJS>().LockItSpecific(-40, 80); player.GetComponent <MouseLookDBJS>().individualFreeze = false; PlayerWeapons.weaponCam.GetComponent <MouseLookDBJS>().individualFreeze = false; PlayerWeapons.canLook = true; ladder = true; soundAmt = soundInterval; }