public IEnumerator Transition(string newSceneName, BirthPointType birthPoint) { var options = SceneManager.LoadSceneAsync(newSceneName); options.allowSceneActivation = false; while (!options.isDone) { if (options.progress >= 0.9f) { options.allowSceneActivation = true; } if (!m_IsTransitioning) { m_IsTransitioning = true; yield return(Instance.StartCoroutine(SceneFader.FadeSceneIn(SceneFader.FadeType.Loading))); } else { yield return(null); } } Player.Instance.Redirect(birthPoint); yield return(StartCoroutine(SceneFader.FadeSceneOut())); m_IsTransitioning = false; }
public IEnumerator Do() { //暗転を解除 yield return(StartCoroutine(SceneFader.FadeSceneIn())); //遭遇メッセージを表示 yield return(StartCoroutine(BattleMessage.GetWindow().ShowAuto("敵が現れた"))); yield break; }
public void FadeIn() { StartCoroutine(Fade()); IEnumerator Fade() { yield return(StartCoroutine(SceneFader.FadeSceneIn())); LuaScript.instance.Resume(); yield break; } }
public IEnumerator Talk() { MessageWindow messageWindow = MessageSystem.GetWindow(); ChoiceWindow choiceWindow = MessageSystem.GetChoise(); InteractableStart(); yield return(StartCoroutine(messageWindow.ShowClick("ひと晩" + roomCharge + "ゴールドですが\nおとまりになられますか"))); yield return(StartCoroutine(choiceWindow.Choice())); int choiceResult = choiceWindow.Result(); if (choiceResult == 1) { if (GameController.Instance.money <= 0) { yield return(StartCoroutine(messageWindow.ShowClick("お金が たりないようです"))); messageWindow.Close(); InteractableEnd(); yield break; } yield return(StartCoroutine(messageWindow.ShowClick("それでは ごゆっくり おやすみください"))); GameController.Instance.money -= roomCharge; Stay(); yield return(StartCoroutine(SceneFader.FadeSceneOut())); yield return(StartCoroutine(SceneFader.FadeSceneIn())); yield return(StartCoroutine(messageWindow.ShowClick("おはようございます。ではいってらっしゃいませ"))); } else { yield return(StartCoroutine(messageWindow.ShowClick("お気をつけて 旅をつづけられますように"))); } messageWindow.Close(); InteractableEnd(); yield break; }