コード例 #1
0
ファイル: OptionQuit.cs プロジェクト: fabri1983/marioBadClone
 void Awake()
 {
     if (instance != null && instance != this)
     {
         duplicated = true;
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
         initialize();
     }
 }
コード例 #2
0
ファイル: OptionQuit.cs プロジェクト: memsyi/marioBadClone
    void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
        }
        else
        {
            instance = this;
            DontDestroyOnLoad(gameObject);
        }

        setupButtons();         // locate the buttons
        GUIScreenLayoutManager.Instance.register(this);
        TransitionGUIFxManager.Instance.register(this, false);
    }