示例#1
0
    //adapta o tamanho da camera na scene
//	private float orthosize = 5;
//	private float aspect = 1.0f;

    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(this.gameObject);
        }
        else
        {
            Destroy(gameObject);
        }
        SceneManager.sceneLoaded += VerificaLevel;
    }
示例#2
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            //DontDestroyOnLoad(this.gameObject);
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        SceneManager.sceneLoaded += VerificaFase;
    }
示例#3
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
     SceneManager.sceneLoaded += VerificaFase;
     bolaEmUso = PlayerPrefs.GetInt("BolaUse");
 }