//private ParallaxManagerScript parallaxManagerScript; void Start() { depthTextObj.AddComponent <FadeCoroutine>(); depthTextObjFadeScript = depthTextObj.GetComponent <FadeCoroutine>(); depthTextObjFadeScript.startingAlpha = 0.0f; depthTextObjFadeScript.endingAlpha = 1.0f; depthTextObjFadeScript.timeToTransition = GameManagerScript.UI_FADE_TIME; depthTextObjFadeScript.imageColor = depthTextObjFadeScript.GetComponent <Text>().color; depthTextObjFadeScript.isText = true; StartCoroutine(depthTextObjFadeScript.fade()); if (GameManagerScript.getGameManagerScript() == null) { Instantiate(gameManagerPrefab, new Vector3(), Quaternion.identity); GameManagerScript.getGameManagerScript().startGame(); } //parallaxManagerScript = GameManagerScript.getGameManagerScript().GetComponent<ParallaxManagerScript>(); GameManagerScript.getGameManagerScript().getHeightManager().getMovementScript().velocity = diveVelocity; //StartCoroutine(updatePlayScene()); }
void Start() { tapToPlayTextObj.SetActive(false); parallaxScript = GetComponent <OpeningParallaxScript>(); parallaxScript.startAnimation(); titleTextObj.AddComponent <FadeCoroutine>(); titleTransitionScript = titleTextObj.GetComponent <FadeCoroutine>(); titleTransitionScript.startingAlpha = 1.0f; titleTransitionScript.endingAlpha = 0.0f; titleTransitionScript.timeToTransition = GameManagerScript.UI_FADE_TIME; titleTransitionScript.imageColor = titleTransitionScript.GetComponent <Text>().color; titleTransitionScript.isText = true; tapToPlayTextObj.AddComponent <FadeCoroutine>(); tapToPlayTransitionScript = tapToPlayTextObj.GetComponent <FadeCoroutine>(); tapToPlayTransitionScript.endingAlpha = 0.0f; tapToPlayTransitionScript.timeToTransition = GameManagerScript.UI_FADE_TIME; tapToPlayTransitionScript.imageColor = tapToPlayTextObj.GetComponent <Text>().color; tapToPlayTransitionScript.isText = true; tapToPlayTransitionScript.destoryAfterTransition = true; StartCoroutine(updateHomeScene()); }