public void end() { GlobalStateController gsc = GameObject.Find("GlobalState(Clone)").GetComponent <GlobalStateController> (); gsc.setLevel(gsc.getLevel() + 1); ScreenFader sf = FindObjectOfType <ScreenFader> (); sf.EndScene(0, true); }
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); } }