private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         this.enabled = false;
     }
 }
Пример #2
0
 public void PlayCoinSound()
 {
     if (PausePanelController.GetSound() == 0)
     {
         return;
     }
     else
     {
         audioSource.PlayOneShot(coinSound);
     }
 }
Пример #3
0
 public void PlayButtonSound()
 {
     if (PausePanelController.GetSound() == 0)
     {
         return;
     }
     else
     {
         audioSource.PlayOneShot(buttonClickSound);
     }
 }
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Пример #5
0
 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();
 }
Пример #6
0
    void Start()
    {
        audioSource        = GetComponent <AudioSource>();
        audioSource.volume = PausePanelController.GetSound();

        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }
    }
Пример #7
0
    public void teleport(PausePanelController nextPanel)
    {
		player.GetComponent<Rigidbody> ().velocity = new Vector3(0,0);
        teleportController.teleport(nextPanel);
    }