コード例 #1
0
ファイル: OndeEstou.cs プロジェクト: franklinti/smash
    //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
ファイル: OndeEstou.cs プロジェクト: xmarcelomota/Futebol
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
     SceneManager.sceneLoaded += VerificaFase;
     bolaEmUso = PlayerPrefs.GetInt("BolaUse");
 }