void Start() { LevelNumber.setSkipIntro(true); //main menu intro should no longer be played when returning to it ftlJump = GameObject.FindGameObjectWithTag("StarList").GetComponent <FTLJump>(); ftlJump.stopAllStars(); blackPanel.gameObject.GetComponent <Image>().enabled = true; if (LevelNumber.getLoadedFromMenu()) { blackPanel.setColors(new Color(0, 0, 0, 1), new Color(0, 0, 0, 0)); preventPauseTimer = 2.5f; } else { blackPanel.setColors(new Color(0, 0, 0, 0), new Color(0, 0, 0, 0)); try { chargeBar.setProgress(0); chargeText.setPercent(0); } catch { } } blackPanel.startColorChange(); LevelNumber.setLoadedFromMenu(false); shipAudio.clip = shipHit; highScores = getHighScores(); bombCooldown = setBombCooldown; }
public IEnumerator displayText(float holdColorDuration) { colorLerp.initialDelay = 0; Color startColor = text.color; Color endColor = startColor; startColor.a = 0; colorLerp.setColors(startColor, endColor); colorLerp.startColorChange(); yield return(new WaitForSeconds(colorLerp.duration + holdColorDuration)); colorLerp.setColors(endColor, startColor); colorLerp.startColorChange(); }
// Update is called once per frame public void screenAppear() { colorLerp.setColors(endColor, startColor); colorLerp.startColorChange(); }