Esempio n. 1
0
    public void Start()
    {
        _instance = this;

        ResetScore();
        actualizarScore += UIMananger.Instance.ActualizarScore;
    }
Esempio n. 2
0
    IEnumerator goToMainMenu()
    {
        yield return(new WaitForSeconds(2f));

        ScoreMananger.instance = null;
        //Go to main Menu

        GetComponent <SteamVR_LoadLevel>().Trigger();
    }
Esempio n. 3
0
    void Awake()
    {
        //Check if instance already exists
        if (instance == null)
        {
            //if not, set instance to this
            instance = this;
        }

        //If instance already exists and it's not this:
        else if (instance != this)
        {
            //Then destroy this. This enforces our singleton pattern, meaning there can only ever be one instance of a GameManager.
            Destroy(gameObject);
        }
    }