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 loadNextLevel() { GameObject.Find("BlackPanel1").GetComponent <GraphicColorLerp>().startColorChange(); LevelNumber.setSkipIntro(false); yield return(new WaitForSeconds(1.5f)); LevelNumber.setLevel(levelNum + 1); SceneManager.LoadScene("Campaign"); }
void Start() { musicSource.clip = menuMusic; skipIntro = LevelNumber.getSkipIntro(); blackPanel = GameObject.Find("BlackPanel1").GetComponent <GraphicColorLerp>(); levelSelectController = levelSelectCanvas.GetComponent <LevelSelectController>(); mainCanvas.SetActive(false); levelSelectCanvas.SetActive(false); creditsCanvas.SetActive(false); if (skipIntro) { setMenuState((int)MenuState.main); GameObject.Find("MenuStarList").GetComponent <FTLJumpWithImage>().stopAllStars(); LevelNumber.setSkipIntro(false); } else { setMenuState((int)MenuState.intro); } if (hideMouse) { Cursor.visible = false; } }