private void Awake() { if (instance == null) { instance = this; } else { this.enabled = false; } }
public void PlayCoinSound() { if (PausePanelController.GetSound() == 0) { return; } else { audioSource.PlayOneShot(coinSound); } }
public void PlayButtonSound() { if (PausePanelController.GetSound() == 0) { return; } else { audioSource.PlayOneShot(buttonClickSound); } }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
public void teleport(PausePanelController nextPanel) { if (player == null) { player = FirstPersonScript.player; } nextPanel.screenManager.OpenPanel(nextPanel.teleportController.teleportScreen); player.gameObject.transform.position = nextPanel.teleportPoint.transform.position; player.gameObject.transform.rotation = nextPanel.teleportPoint.transform.rotation; player.playerCamera.transform.rotation = new Quaternion(0, 0, 0, 0); player.gravityOnNormals.rayCastGround(); screenManager.CloseCurrent(); }
void Start() { audioSource = GetComponent <AudioSource>(); audioSource.volume = PausePanelController.GetSound(); if (instance == null) { instance = this; } else { Destroy(gameObject); } }
public void teleport(PausePanelController nextPanel) { player.GetComponent<Rigidbody> ().velocity = new Vector3(0,0); teleportController.teleport(nextPanel); }