Example #1
0
    IEnumerator Result(ResultInfo info)
    {
        GameObject.FindObjectOfType <BgmManager> ().StopAll();
        GameObject.FindObjectOfType <SoundEffectManager> ().StopAll();

        yield return(null);

        SceneStack.SetActive(false);

        yield return(new WaitForSeconds(1.5f));

        var goNext = false;

        StartCoroutine(ui.result.Result(info.win, () => goNext = true));

        for (int i = 0; i < 30; i++)
        {
            Time.timeScale = 1f - i / 30f;
            yield return(null);
        }
        Time.timeScale = 0f;
        yield return(null);

        yield return(new WaitUntil(() => goNext));

        yield return(StartCoroutine(SceneStack.Close()));

        Time.timeScale = 1f;
        SceneStack.MoveScene("Title");
    }
Example #2
0
    IEnumerator Move()
    {
        button.interactable = false;

        SceneStack.SetActive(false);
        yield return(StartCoroutine(SceneStack.Close()));

        SceneStack.MoveScene("Sorato");
    }
Example #3
0
    IEnumerator Start()
    {
        button.onClick.AddListener(() => {
            StartCoroutine(Move());
        });

        yield return(StartCoroutine(SceneStack.Open()));

        SceneStack.SetActive(true);
    }
Example #4
0
    IEnumerator Start()
    {
        // ボタンタップイベント、シーン遷移開始
        StartButton.OnClickAsObservable()
        .Subscribe(_ => StartCoroutine(Move()));

        // フェード
        yield return(StartCoroutine(SceneStack.Open()));

        SceneStack.SetActive(true);
    }
Example #5
0
    private IEnumerator Move()
    {
        // ボタンをfalseにすると選択できなく出来る
        StartButton.interactable = false;

        // フェード
        SceneStack.SetActive(false);
        yield return(StartCoroutine(SceneStack.Close()));

        // シーン遷移
        SceneStack.MoveScene("InGame");
    }
Example #6
0
    IEnumerator Start()
    {
        // シーン遷移完了
        yield return(StartCoroutine(SceneStack.Open()));

        SceneStack.SetActive(true);

        // 初期化処理開始
        StartCoroutine(GameInitializeCoroutine());

        // 初期化処理完了時の処理 (ゲーム開始など)
        OnInitializedAsync
        .Subscribe(_ => Debug.Log("completed."));
    }
Example #7
0
    IEnumerator StartGame()
    {
        Voice.Play(VO.Start);
        yield return(StartCoroutine(SceneStack.Open()));

        ui.hpBar.GetComponent <UiAutoFill> ().StartFill();
        yield return(null);

        foreach (var npc in npcs)
        {
            npc.StartNpc();
        }

        yield return(null);

        SceneStack.SetActive(true);
    }