示例#1
0
    public void end()
    {
        GlobalStateController gsc = GameObject.Find("GlobalState(Clone)").GetComponent <GlobalStateController> ();

        gsc.setLevel(gsc.getLevel() + 1);
        ScreenFader sf = FindObjectOfType <ScreenFader> ();

        sf.EndScene(0, true);
    }
示例#2
0
    public void Interact()
    {
        GlobalStateController gsc = GameObject.Find("GlobalState(Clone)").GetComponent <GlobalStateController> ();

        if (gsc.getLevel() == 1)
        {
            gsc.setLevel(gsc.getLevel() + 1);
            ScreenFader sf = FindObjectOfType <ScreenFader> ();
            sf.EndScene(0, false);
        }
    }
 void Awake()
 {
     if (Instance == null)
     {
         DontDestroyOnLoad(gameObject);
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
 }