void Start() { Application.targetFrameRate = 60; if (LevelManager.Instance != null) { Destroy(gameObject); return; } else { DontDestroyOnLoad(gameObject); Instance = this; } DontDestroyOnLoad(Fogger); Fogger = GameObject.Find("FogCanvas").transform.Find("ScreenFogger").GetComponent <ScreenFogger>(); Whiter = GameObject.Find("FogCanvas").transform.Find("ScreenWhiter").GetComponent <ScreenWhiter>(); LightTotems(); }
void Start() { Instance = this; }