Example #1
0
    public override void EnterState()
    {
        //build a board and populate with actors
        csController.ToggleOn();

        CutSceneAction action = cutscene.NextAction();

        if (action is ChoiceAction)
        {
            // swap input states here;
            if (boardManager == null)
            {
                baseMange.inputFSM.SwitchState(new
                                               CutsceneChoiceState(baseMange, action as ChoiceAction,
                                                                   prevStatus));
            }
            else
            {
                boardManager.inputFSM.SwitchState(new
                                                  CutsceneChoiceState(boardManager, action as ChoiceAction,
                                                                      prevStatus));
            }
        }
        else
        {
            csController.StartCoroutine(action.ExecuteAction(csController));
        }
    }
    private void GetNextNode()
    {
        if (cs.IsEmpty())
        {
            current_action = null;
            return;
        }

        CutSceneAction a = cs.NextAction();

        if (a is ChoiceAction)
        {
            current_action = a as ChoiceAction;
            dialogpanel.UpdateDialog(current_action);
            choicePanel.InitDialogChoice(current_action as ChoiceAction);
        }
        else if (a is DialogueAction)
        {
            current_action = a as DialogueAction;
            choicePanel.ToggleOff();
            dialogpanel.UpdateDialog(current_action);
        }
        else
        {
            current_action = null;
        }
    }
    public void InitCutscene(CutScene cs)
    {
        this.cs          = cs;
        uidGameObjectMap = new Dictionary <string, GameObject>();
        skillObjects     = new List <AnimationObject>();

        ToggleOn();

        PrintBoard();
        DisplayActors();

        currentAction = cs.NextAction();
        NewInput();
    }
    public void NextNode()
    {
        if (cs.IsEmpty() == false)
        {
            currentAction = cs.NextAction();
            NewInput();
        }
        else
        {
            //the cutscene is done
            //we should re enable all the stuff we disabled before
            //maybe send a signal that the cutscene was played or something so that it doesnt
            //keep playing
            Debug.Log("Attempting to delete game objects");

            Globals.cutsceneData.currentFIle.SwitchScene();

            //ToggleOff();
        }
    }