void Start() { B.Assert(zInstance == null); zInstance = this; // Find objects in scene, init references failText = GameObject.Find("FailText"); lightController = FindObjectOfType <LerpMap>(); // assume unique mapper = FindObjectOfType <Maping>(); player = GameObject.Find("Player").GetComponent <Assets.BasicMovement>(); tombstone = GameObject.Find("Tombstone"); winText = GameObject.Find("WinText"); B.Assert(player != null && lightController != null && tombstone != null); // ^Could use Resources.Load() here instead, but since both the player and tombstone are unique, we might as well just preplace them in the scene StartClock(); }
void Start() { B.Assert(zInstance == null); zInstance = this; // Find objects in scene, init references failText = GameObject.Find("FailText"); lightController = FindObjectOfType<LerpMap>(); // assume unique mapper = FindObjectOfType<Maping>(); player = GameObject.Find("Player").GetComponent<Assets.BasicMovement>(); tombstone = GameObject.Find("Tombstone"); winText = GameObject.Find("WinText"); B.Assert(player != null && lightController != null && tombstone != null); // ^Could use Resources.Load() here instead, but since both the player and tombstone are unique, we might as well just preplace them in the scene StartClock(); }