Пример #1
0
    void CheckForNextStep()
    {
        /*
         * if (SaveManager.Instance.dataKlaus == null)
         * {
         *  SaveManager.Instance.StartSaveManager();
         * }*/

        if (CollectablesManager.isCollectableReady(TypeLevel))//Pregunto si este collectable ya se agarro
        {
            SaveManager.Instance.LevelCollectableLoaded = Application.loadedLevelName;

            if (CollectablesManager.isCollectableFull(TypeLevel))//Pregunto si ya se colleciono todo
            {
                SaveManager.Instance.LevelToLoadVideoCollectable = Door.NextScene;
                //Muestro Puerta
                Door.pausa = pausa;
                Door.gameObject.SetActive(true);
            }
            else
            {
                SaveManager.Instance.LevelToLoadVideoCollectable = SaveManager.Instance.LevelToLoadCollectable;
                //Muestro Portal
                Portal.pausa = pausa;
                Portal.gameObject.SetActive(true);
            }
            gameObject.SetActive(false);
        }
    }
Пример #2
0
    void FinishGivePiece()
    {
        collectable_UI.onFinish -= FinishGivePiece;
        collectable_UI.gameObject.SetActive(false);


        SaveManager.Instance.LevelCollectableLoaded = Application.loadedLevelName;

        if (posToShow == -1)
        {
            SaveManager.Instance.LevelToLoadVideoCollectable = SaveManager.Instance.LevelToLoadCollectable;
        }
        else
        {
            if (CollectablesManager.isCollectableReady(TypeLevel))
            {
                if (CollectablesManager.isCollectableFull(TypeLevel))
                {
                    SaveManager.Instance.LevelToLoadVideoCollectable = Door.NextScene;
                }
                else
                {
                    SaveManager.Instance.LevelToLoadVideoCollectable = SaveManager.Instance.LevelToLoadCollectable;
                }
            }
        }

        CameraFade.StartAlphaFade(Color.black, false, 0.2f);
        CameraFade.Instance.m_OnFadeFinish += LoadLevel;
    }