Exemplo n.º 1
0
    /// <summary>
    /// NOTE: Ensure this happens before other cut scenes if any in rooms
    /// in Awake or After Init functions.
    /// </summary>
    public void PlayMapNotification(
        string mapName,
        Action cb            = null,
        bool isInteractAfter = true
        )
    {
        game.ChangeStateCutScene();

        mapNotification.Open(mapName);

        StartCoroutine(WaitToEndNotification());

        IEnumerator WaitToEndNotification()
        {
            yield return(new WaitForSeconds(duration));

            mapNotification.Close(() => {
                if (isInteractAfter)
                {
                    game.ChangeStateInteract();
                }

                if (cb != null)
                {
                    cb();
                }
            });
        }
    }
Exemplo n.º 2
0
    private void ProgressNotification(bool isLastWell)
    {
        game.ChangeStateCutScene();

        StartCoroutine(WaitToPlayClip());

        IEnumerator WaitToPlayClip()
        {
            yield return(new WaitForSeconds(beforePlaySecretSFXWaitTime));

            // Play Correct Partial Progress SFX if is correct well but not done yet. Play Secret SFX when done.
            if (isLastWell)
            {
                GetComponent <AudioSource>().PlayOneShot(Script_SFXManager.SFX.Secret, Script_SFXManager.SFX.SecretVol);
            }
            else
            {
                GetComponent <AudioSource>().PlayOneShot(
                    Script_SFXManager.SFX.CorrectPartialProgress,
                    Script_SFXManager.SFX.CorrectPartialProgressVol
                    );
            }

            yield return(new WaitForSeconds(afterPlaySecretSFXWaitTime));

            game.ChangeStateInteract();

            if (isLastWell)
            {
                CompleteState();
            }
        }
    }
Exemplo n.º 3
0
    public override void Effect()
    {
        Script_Game game = Script_Game.Game;

        game.ChangeStateCutScene();

        // Check Game if this is used in Mynes Grand Mirror where we need to switch to the Weekend Cycle.
        if (game.IsLastElevatorSaveAndStartWeekendCycle())
        {
            game.ElevatorCloseDoorsCutScene(exit, elevatorSaveAndStartWeekendBehavior, type);
        }
        else
        {
            game.ElevatorCloseDoorsCutScene(exit, elevatorExitBehavior, type);
        }
    }
Exemplo n.º 4
0
    public void PlayDayNotification(
        Action cb             = null,
        bool _isInteractAfter = true
        )
    {
        dayNotification.DayText           = runsManager.Run.dayName;
        dayNotification.CycleCountSubtext = runsManager.CycleCount.FormatCycleCount();

        game.ChangeStateCutScene();

        if (cb != null)
        {
            onTimelineDoneAction = cb;
        }
        isInteractAfter = _isInteractAfter;

        timelineController.PlayableDirectorPlayFromTimelines(0, 0);
    }