// IEnumerator Camera Switch () // Delays the camera from displaying the game level until everything should have loaded IEnumerator CameraSwitch() { header.text = "Please wait..."; yield return(new WaitForSeconds(3)); aiSpawner.BeginPlacing(prefabHeight); yield return(new WaitForSeconds(2)); myMain.transform.position = new Vector3(myMain.transform.position.x, myMain.transform.position.y + (float)prefabHeight, myMain.transform.position.z); myMain.SetActive(true); splashCanvas.SetActive(false); gameObject.SetActive(false); }
// IEnumerator Camera Switch () // Delays the camera from displaying the game level until everything should have loaded IEnumerator CameraSwitch() { header.text = "Please wait..."; yield return(new WaitForSeconds(2)); Vector2d myLoc; myLoc = geoForward.GetLoc(); basicMap.Initialize(myLoc, 15); yield return(new WaitForSeconds(3)); prefabHeight = getHeight.HeightForPrefab(myLoc.x, myLoc.y, basicMap); aiSpawner.BeginPlacing(prefabHeight); yield return(new WaitForSeconds(2)); myMain.transform.position = new Vector3(myMain.transform.position.x, myMain.transform.position.y + (float)prefabHeight, myMain.transform.position.z); myMain.SetActive(true); splashCanvas.SetActive(false); gameObject.SetActive(false); }