示例#1
0
    private IEnumerator InitializeStage()
    {
        ScoreManager.Instance.stopTimer = true;
        ScoreManager.Instance.ResetTimer();
        titleCard.SetActive(true);
        //var titleCardDuration = titleCard.GetComponent<Animator>().GetCurrentAnimatorClipInfo(0)[0].clip.length;
        var titleCardDuration = 5;

        StartSong();
        player.disableInput = true;
        player.Respawn(startPoint, startRotation);
        ObjectsManager.Instance.RespawnFreedomObjects();
        yield return(new WaitForSeconds(titleCardDuration));

        ScoreManager.Instance.stopTimer = false;
        ScoreManager.Instance.time      = startTime;
        player.disableInput             = false;
        player.simulate = true;
        titleCard.SetActive(false);
    }