void Start() { fade = transform.GetComponentInChildren <VignetteScript>(); fade.FadeIn(); lifetime = new Timer(fade.fadeInTime, () => AcceptInput()); lifetime.Restart(); }
void Start() { //map = GetComponent<MapScript>(); bms = GetComponent <BunnyManagerScript>(); vignette = GetComponentInChildren <VignetteScript>(); vignette.FadeIn(); playerRespawnTimer = new Timer(playerRespawnTime, () => ResetPlayer()); levelEndDelayTimer = new Timer(levelEndDelay, () => NextScene()); }
void Start() { fade = transform.GetComponentInChildren <VignetteScript>(); fade.FadeIn(); lifetime = new Timer(timeOnScreen + fade.fadeInTime, () => FadeOut()); lifetime.Restart(); if (getTotalScore) { int totalLosses = GameObject.FindGameObjectWithTag("Score").GetComponent <ScoreScript>().GetTotal(); GetComponent <GUIText>().text = totalLosses.ToString(); Application.ExternalCall("TotalLosses", totalLosses); } else { ScoreScript score = GameObject.FindGameObjectWithTag("Score").GetComponent <ScoreScript>(); int losses = score.GetMostRecent(); GetComponent <GUIText>().text = losses.ToString(); Application.ExternalCall("LossesOnLevel", score.PreviousScene, losses); } }