private void Update() { if (STBInput.GetButtonDown("Pause")) { PauseMenu.instance.CallPauseMenu(); } }
protected override void Update() { base.Update(); if (IsActivated && STBInput.GetButtonDown("Cancel")) { SoundManager.instance.PlayUiEfx(UiEfx.CANCEL); MenuController.instance.OnMainMenuCancel(); } }
void Update() { if (STBInput.GetButtonDown("Pause")) { PauseMenu.instance.CallPauseMenu(); } if (!IsSceneOver && Player.IsDeath) { OnStageFailed(); } }
void Update() { #if OPEN_DEBUG_MODE if (Input.GetKeyDown(KeyCode.PageDown)) { OnSceneEnd(); } #endif if (isParaOver) { bool showNext = false; if (isPageOver) { if (STBInput.GetButtonDown("Next") || STBInput.GetButtonDown("Skip")) { SoundManager.instance.PlayUiEfx(UiEfx.TEXT); showNext = true; isPageOver = false; pageEndMark.Hide(); storyBoard.ClearAll(); } } else { if (STBInput.GetButtonDown("Next") || STBInput.GetButton("Skip")) { SoundManager.instance.PlayUiEfx(UiEfx.TEXT); showNext = true; paraEndMark.Hide(); } } if (showNext) { isParaOver = false; if (currentPara < currentStory.Length) { StartCoroutine(ShowPara()); } else { storyBoard.ClearAll(); OnSceneEnd(); } } } }
void Update() { if (STBInput.GetButtonDown("Pause")) { PauseMenu.instance.CallPauseMenu(); } if (!IsSceneOver && Player.IsDeath) { OnStageFailed(); } HUDManager.instance.SetHP(BOSS_ID_POPOLA, popola.healthPoint / BOSS_HP); HUDManager.instance.SetHP(BOSS_ID_DEVOLA, devola.healthPoint / BOSS_HP); }
protected override void Update() { if (!IsCurrentActive()) { return; } base.Update(); if (STBInput.GetButtonDown("Cancel")) { SoundManager.instance.PlayUiEfx(UiEfx.CANCEL); MenuController.instance.BackToMainMenu(true); } }
protected override void Update() { if (!IsCurrentActive()) { return; } base.Update(); if (STBInput.GetButtonDown("Cancel")) { SoundManager.instance.PlayUiEfx(UiEfx.CANCEL); ContinueGame(); } }
protected override void Update() { if (!IsCurrentActive()) { return; } base.Update(); if (STBInput.GetButtonDown("Cancel")) { SoundManager.instance.PlayUiEfx(UiEfx.CANCEL); if (LastPressed == null) { FadeOut(0.4f); EventSystem.current.SetSelectedGameObject(null); } else { LastPressed.SetPressed(false); } } }
protected override void Update() { if (!IsCurrentActive()) { return; } base.Update(); if (STBInput.GetButtonDown("Cancel")) { SoundManager.instance.PlayUiEfx(UiEfx.CANCEL); if (LastPressed == null) { MenuController.instance.BackToOptionsMenu(); EventSystem.current.SetSelectedGameObject(null); } else { LastPressed.SetPressed(false); EventSystem.current.SetSelectedGameObject(LastFocused.gameObject); } } }
private void Update() { if (currentPlatform != -1 && currentEnemy == null) { EnemyBulletManager.instance.DestroyAll(); isClear[currentPlatform] = true; lastClear = currentPlatform; IsInBattle = false; if (currentPlatform == 17) { endBridge.Open(); } else { bridgeGroups[currentPlatform].Open(); } if (GameManager.IsGameLevelHigher(GameLevel.Hard)) { redCubes.BlinkOut(); } currentPlatform = -1; } if (STBInput.GetButtonDown("Pause")) { PauseMenu.instance.CallPauseMenu(); } if (!IsSceneOver && Player.IsDeath) { OnStageFailed(); } }
public override bool GetButtonDown(string buttonName) { return(STBInput.GetButtonDown(buttonName)); }
void Update() { //For BGM states float current = SoundManager.instance.Current; if (isFinalEntered) { if (wingCount <= 0) { if (current >= BGM_LOOP_POINT[1] + BGM_LOOP_LENGTH[1]) { SoundManager.instance.SeekTo(current - BGM_LOOP_LENGTH[1]); } } else { if (!isChorusStarted) { if (current < BGM_CHORUS_POINT) { isChorusStarted = true; } else { if (current >= BGM_LOOP_POINT[1] + BGM_LOOP_LENGTH[1]) { SoundManager.instance.SeekTo(current - BGM_LOOP_LENGTH[1]); } } } else { if (currentBgm != 2) { if (current >= BGM_CHORUS_POINT) { currentBgm = 2; SoundManager.instance.PlayBgm(bgms[2]); SoundManager.instance.SeekTo(current + BGM_OFFSET); } } else { if (current >= BGM_LOOP_POINT[2] + BGM_LOOP_LENGTH[2]) { SoundManager.instance.PlayBgm(bgms[2], 3f); SoundManager.instance.SeekTo(current - BGM_LOOP_LENGTH[2]); } } } } } else { if (current >= BGM_LOOP_POINT[0] + BGM_LOOP_LENGTH[0]) { SoundManager.instance.SeekTo(current - BGM_LOOP_LENGTH[0]); } } //For Enemy States if (isInRecoverPhase) { if (checkedCount < 4) { for (int i = EnemyManager.instance.Count; i < 4 + checkedCount; i++) { EnemyManager.instance.SetEnemy(enemyPrefab, GetRandomPosition()); } } else { if (EnemyManager.instance.IsEmpty) { isInRecoverPhase = false; enemyBoss.IsInvincible = false; } } } if (STBInput.GetButtonDown("Pause")) { PauseMenu.instance.CallPauseMenu(); } if (!IsSceneOver && Player.IsDeath) { OnStageFailed(); } }
IEnumerator ShowPara() { StoryPara para = currentStory[currentPara]; if (!para.IsTag) { storyBoard.AddText(para.x, para.y); currentChar = 0; float time = 0f; float efxTime = 0f; bool isSpeedUp = false; while (currentChar < para.Length) { yield return(null); if (STBInput.GetButtonDown("Next")) { isSpeedUp = true; } if (STBInput.GetButtonUp("Next")) { isSpeedUp = false; } if (STBInput.GetButton("Skip")) { currentChar = para.Length - 1; } time += Time.deltaTime * (isSpeedUp ? 5f : 1f); efxTime += Time.deltaTime; if (time > TEXT_GAP) { currentChar++; if (efxTime >= TEXT_GAP) { SoundManager.instance.PlayUiEfx(UiEfx.TEXT); while (efxTime >= TEXT_GAP) { efxTime -= TEXT_GAP; } } storyBoard.SetText(para.Substring(currentChar)); if (para.GetChar(currentChar - 1).Equals('\n')) { time -= TEXT_GAP * 5f; } else { time -= TEXT_GAP; } } } isParaOver = true; paraEndMark.Set(GetActPos(storyBoard.GetEndPosition())); currentPara++; para = currentStory[currentPara]; } if (para.IsTag) { currentPara++; if (para.IsBgmPlay) { SoundManager.instance.PlayBgm(bgm, 2f); } if (para.IsBgmStop) { SoundManager.instance.StopBgm(1f); } if (para.IsPageEnd) { paraEndMark.Hide(); pageEndMark.Set(); isPageOver = true; yield break; } if (para.IsClipEnd) { OnSceneEnd(); yield break; } if (!isParaOver) { StartCoroutine(ShowPara()); } } }