示例#1
0
    protected IEnumerator OnEnterAction()
    {
        float timeArcade = 0;

        if (TimeAttackSystem.Instance != null)
        {
            TimeAttackSystem.Instance.PauseTimer();
            timeArcade = TimeAttackSystem.Instance.timer;
        }

        ChangueScene();
        StopCoroutine("LevelCounterTime");
        Klaus.CanMove(true);
        Klaus.activeJump = false;
        Instantiate(floatingMusik, transform.position, transform.rotation);//Musica
        Camera.main.GetComponent <InputTouchPS4>().Block(true);
        float timer = CounterTimerPlay.Instance.EndTime();

        SaveManager.Instance.AddPlayTime(timer);

        ManagerAnalytics.MissionCompleted(Application.loadedLevelName,
                                          false, timer, timeArcade, true);
        CompleteScene();
        CompleteLevel();
        yield return(StartCoroutine(new TimeCallBacks().WaitPause(TimeTochangeLevel)));

        if (SaveManager.Instance.comingFromTimeArcadeMode && ShowArcade)
        {
            ManagerHudUI.Instance.ShowLevelCompleted(SceneToGoArcade);
        }
        else
        {
            ActivateManualty();
        }
    }