public void Death(int cause) { if (isGameplay && !godmode) { StopCapture(); GameController.instance.PlayerDeath(); _controller.enabled = false; DeathCol.SetActive(true); CameraObj.transform.rotation = Quaternion.Euler(CameraObj.GetComponent <Player_MouseLook>().rotation); CameraObj.transform.parent = DeathCol.transform; CameraObj.GetComponent <Player_MouseLook>().enabled = false; isGameplay = false; eyes.color = Color.clear; Destroy(handPos); overlay.sprite = null; handEquip.color = Color.clear; SCP_UI.instance.SNav.SetActive(false); SCP_UI.instance.radio.StopRadio(); switch (cause) { case 3: { sfx.PlayOneShot(Deaths[cause]); GameController.instance.deathmsg = Localization.GetString("deathStrings", "death_106_stone"); break; } case 1: { sfx.PlayOneShot(Conch[Random.Range(0, Conch.Length)]); break; } default: { sfx.PlayOneShot(Deaths[cause]); break; } } } }
public void FakeDeath(int cause) { if (isGameplay && !godmode && !noMasterController) { StopCapture(); GameController.instance.FakeDeath(); _controller.enabled = false; DeathCol.SetActive(true); CameraObj.transform.parent = DeathCol.transform; CameraObj.GetComponent <Player_MouseLook>().enabled = false; isGameplay = false; eyes.color = Color.clear; Destroy(handPos); overlay.sprite = null; handEquip.color = Color.clear; SCP_UI.instance.SNav.SetActive(false); switch (cause) { case 0: { sfx.PlayOneShot(Deaths[0]); break; } case 1: { sfx.PlayOneShot(Conch[Random.Range(0, Conch.Length)]); break; } case 2: { sfx.PlayOneShot(Deaths[1]); break; } } } }