IEnumerator Script() { StartCoroutine("Shake"); yield return(StartCoroutine(ChangeAppearance())); yield return(StartCoroutine(BlastLight())); StopCoroutine("Shake"); _display.sprite = permanent ? null : _lastTransformAppeareance; _earthquake.StartEarthquake(); if (!permanent) { InitTrueDaystar(); yield return(StartCoroutine(DissolveBlastLight())); } else { _theHellFire.transform.position = new Vector3(0f, 16f, 0f); yield return(StartCoroutine(DissolveBlastLight())); _earthquake.StopEarthquake(); yield return(StartCoroutine(_endGame.Play())); } Destroy(gameObject); }
IEnumerator ScriptReleaseAndDecay() { _skill.StopFlyingOut(); yield return(StartCoroutine(_skill.SheepGoingHome3())); yield return(StartCoroutine(_skill.SheepGoingHome2())); yield return(StartCoroutine(_skill.SheepGoingHome())); yield return(StartCoroutine(BlastLight())); transform.position = new Vector3(0f, 10f, 0f); _earthquake.StopEarthquake(); StartCoroutine(TheHellFireIsGone()); yield return(new WaitForSeconds(1.25f)); _display.color = new Color32(255, 255, 255, 0); yield return(StartCoroutine(DissolveBlastLight())); yield return(StartCoroutine(_endGame.Play())); Destroy(gameObject); }
IEnumerator Appear() { _earthquake.StartEarthquake(); var t = 0f; var srcPos = _daystar.position; var destPos = new Vector3(srcPos.x, _appearPointY, srcPos.z); while (t <= 1f) { t += Time.deltaTime / _appearTime; _daystar.position = Vector3.Lerp(srcPos, destPos, t); yield return(null); } yield return(new WaitForSeconds(.75f)); _earthquake.StopEarthquake(); SceneManager.LoadScene(string.Format("Scenes/{0}", _defaultScene)); }