private void Update() { if (LoaderManager.Get().OnLevel()) { time += Time.deltaTime; } }
void TextLoader() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100); loadingText.text = loadingVal.ToString() + "%"; if (LoaderManager.Get().loadingProgress >= 1) SetVisible(false); }
IEnumerator ChangeScene(string sceneName) { AudioSource.PlayClipAtPoint(audioSelect, CameraController.Get().transform.position, 1f); yield return(new WaitForSeconds(2)); LoaderManager.Get().LoadScene(sceneName); }
void BarLoader() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100); Debug.Log(loadingVal * 0.01); loadingBar.fillAmount = (loadingVal*0.01f); if (LoaderManager.Get().loadingProgress >= 1) SetVisible(false); }
public void ForcedChangeScene() { if (SceneManager.GetActiveScene().name == "Gameplay") { Destroy(GameManager.Get().gameObject); Destroy(WaveSystem.Get().gameObject); Destroy(TurretSpawner.Get().gameObject); Destroy(Highscore.Get().gameObject); Destroy(MilestoneManager.Get().gameObject); UpgradeSystem upgrades = UpgradeSystem.Get(); if (upgrades) { upgrades.CleanList(); } } else if (SceneManager.GetActiveScene().name == "Upgrade Screen") { AkSoundEngine.StopAll(); } if (sceneName == "Gameplay") { AkSoundEngine.StopAll(); UpgradeSystem upgrades = UpgradeSystem.Get(); if (upgrades) { upgrades.CleanList(); } LoaderManager.Get().LoadScene(sceneName); UILoadingScreen.Get().SetVisible(true); } else if (sceneName == "Upgrade Screen") { AkSoundEngine.StopAll(); UpgradeSystem upgrades = UpgradeSystem.Get(); if (upgrades) { upgrades.CleanList(); } SceneManager.LoadScene(sceneName); } else { SceneManager.LoadScene(sceneName); } Time.timeScale = 1; }
public void Update() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100); loadingText.text = "Loading Level " + gameMan.level + " " + loadingVal; if (LoaderManager.Get().loadingProgress >= 1) { SetVisible(false); } }
public void Update() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100); loadingText.text = loadingVal + "%"; if (LoaderManager.Get().loadingProgress >= 1) { SetVisible(false); } }
public void Update() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100); loadingText.text = "Loading " + loadingVal; if (LoaderManager.Get().loadingProgress >= 1) { Destroy(this.gameObject); } }
public void NextLvl() { level++; LoaderManager.Get().LoadScene("GameScene"); UILoadingScreen.Get().SetVisible(true); landingScreen.SetActive(false); winText.gameObject.SetActive(false); loseText.gameObject.SetActive(false); next.onClick.RemoveAllListeners(); }
public bool Playing() { if (LoaderManager.Get().OnLevel()) { return(true); } else { return(false); } }
public void Update() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100); loadingText.text = "LOADING LEVEL " + PlayerStatusSave.Get().level.ToString() + " " + loadingVal + "%"; loadingBar.value = loadingVal; if (LoaderManager.Get().loadingProgress >= 1) { SetVisible(false); } }
public void GoToThisScene() { if (sceneName == "Level") { LoaderManager.Get().LoadScene(sceneName); UILoadingScreen.Get().SetVisible(true); } else { SceneManager.LoadScene(sceneName); } }
public void Update() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100) + 1; loadingText.text = "LOADING LEVEL " + loadingVal + "%"; loadingBar.value = loadingVal; if (LoaderManager.Get().loadingProgress >= 1) { LoaderManager.Get().loadingProgress = 0; LoaderManager.Get().timeLoading = 0; SetVisible(false); } }
public void Update() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100); loadingText.text = "Loading " + loadingVal; if (LoaderManager.Get().loadingProgress >= 1 && !onGame) { if (anim) { anim.SetTrigger("loadingComplete"); } } }
IEnumerator playerDeath() { deathOn = true; ShipController.Get().OnDeath(); CameraController.Get().Deactivate(); yield return(new WaitForSeconds(5)); LoaderManager.Get().LoadScene("MainMenu"); yield return(null); ShipController.Get().Revive(); CameraController.Get().Activate(); ChangeLevel(); deathOn = false; }
public void GoToThisScene() { switch (sceneName) { case "Level1": BGMMenu.Get().stopMenuMusic(); LoaderManager.Get().LoadScene(sceneName); UILoadingScreen.Get().SetVisible(true); break; case "Level2": BGMMenu.Get().stopMenuMusic(); LoaderManager.Get().LoadScene(sceneName); UILoadingScreen.Get().SetVisible(true); break; case "GameOver": SceneManager.LoadScene(sceneName); break; case "Menu": if (SceneManager.GetActiveScene().name == "GameOver") { BGMMenu.Get().playMenuMusic(); } SceneManager.LoadScene(sceneName); break; case "Controls": SceneManager.LoadScene(sceneName); break; case "Credits": SceneManager.LoadScene(sceneName); break; default: if (isLevelRestartButton) { SceneManager.LoadScene(SaveLastLevel.Get().loadLevelName()); } else { SceneManager.LoadScene(sceneName); } break; } }
private void Initialize() { loader = LoaderManager.Get(); Tower.TowerDestroyed += GameOver; LightStand.LightFinished += GameWon; if (DebugScreen.GetInstance()) { DebugScreen.GetInstance().AddButton("ResetGameScene", ResetGame); DebugScreen.GetInstance().AddButton("Add Players Level", LevelUpPlayers); } aSource = GetComponent <AudioSource>(); AudioManager.Get().AddMusic(aSource); mage = GameObject.Find("Mage"); archer = GameObject.Find("Archer"); GiveOrbsToPlayers(); isInitialized = true; }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "BoundWall") { GameManager.Get().ChangeLevel(); transform.GetChild(0).transform.gameObject.SetActive(true); switch (scene) { case Scenes.LEVEL2: LoaderManager.Get().LoadScene("Level2"); break; case Scenes.FINAL: LoaderManager.Get().LoadScene("FinalScreen"); break; } } }
public void Update() { int loadingVal = (int)(LoaderManager.Get().loadingProgress * 100); loadingText.text = "Loading " + loadingVal; if (LoaderManager.Get().loadingProgress >= 1) { Destroy(this.gameObject); } if (!textChange) { StartCoroutine(RandomTexts()); } nextLevel.text = "Next zone: " + levelCount; }
public void LevelFinish() { Scene currScene = SceneManager.GetActiveScene(); switch (currScene.name) { case "Level1": LoaderManager.Get().LoadScene("Level2"); break; case "Level2": LoaderManager.Get().LoadScene("Level3"); break; case "Level3": LoaderManager.Get().LoadScene("FinalScreen"); break; } }
private void Start() { switch (LoaderManager.Get().GetNextScene()) { case "Level1": levelNameText.text = "Level 1"; break; case "Level2": levelNameText.text = "Level 2"; break; case "Level3": levelNameText.text = "Level 3"; break; default: levelNameText.text = ""; break; } }
public void GoToLevel() { if (savedStatus.isPlayerAlive) { savedStatus.level++; if (savedStatus.level > maxLevels) { SceneManager.LoadScene("Menu"); } else { LoaderManager.Get().LoadScene("Level" + (savedStatus.level)); UILoadingScreen.Get().SetVisible(true); } } else { LoaderManager.Get().LoadScene("Level" + savedStatus.level); UILoadingScreen.Get().SetVisible(true); } }
public void ChangeScene() { if (hasLoadingScreen) { LoaderManager.Get().LoadScene(sceneToChange); UILoadingScreen.Get().SetVisible(true); if (GameManager.Get()) { Destroy(GameManager.Get().gameObject); } } else { if (GameManager.Get()) { Destroy(GameManager.Get().gameObject); } SceneManager.LoadScene(sceneToChange); } }
// Update is called once per frame void Update() { if (gameStarted) { if (totalTime > 0) { totalTime -= Time.deltaTime; } if (totalTime <= 0 || gameOver) { LoaderManager.Get().LoadScene("MainMenuScene"); } if (win) { winTimer += Time.deltaTime; if (winTimer > 5) { LoaderManager.Get().LoadScene("MainMenuScene"); } } } if (Input.GetKeyDown(KeyCode.F1)) { BossMode(); } if (Input.GetKeyDown(KeyCode.F2)) { WinGame(); } if (Input.GetKeyDown(KeyCode.Escape)) { SetPause(); } }
public void ChangeScene() { if (sceneName == "") { sceneName = SceneManager.GetActiveScene().name; } Time.timeScale = 1; if (isALevel) { if (assignLevelNumber) { PlayerStatusSave.Get().level = levelNumber; } LoaderManager.Get().LoadScene(sceneName); UILoadingScreen.Get().SetVisible(true); } else { SceneManager.LoadScene(sceneName); } }
public void GoToGameOver() { LoaderManager.Get().LoadScene(3); savedLevelThatComesFrom = actualLevelData.level; }
public void GoToNextLevel() { LoaderManager.Get().LoadScene(actualLevelData.nextLevel); savedLevelThatComesFrom = actualLevelData.level; }
public void GoToMenu() { LoaderManager.Get().LoadScene(0); savedLevelThatComesFrom = actualLevelData.level; }
public void Update() { loadingVal += (int)(LoaderManager.Get().loadingProgress * 100); loadingVal = Mathf.Clamp(loadingVal, 0, 100); loadingText.text = "Loading " + loadingVal; }
public void ChangeLevel() { LoaderManager.Get().LoadNewLevel(); }