void Awake()
        {
            DialogueRunner dialogueRunner = FindObjectOfType <DialogueRunner>();

            dialogueRunner.AddCommandHandler("waitForMixingTrigger", WaitForMixingTrigger);
            dialogueRunner.AddCommandHandler("waitForDrinksServed", WaitForDrinksServed);
        }
Exemple #2
0
    private void Start()
    {
        DialogueRunner runner = MainSingleton.Instance.dialogueRunner;

        runner.AddCommandHandler <string>("SetTime", SetTime);
        runner.AddCommandHandler <int>("AddMinutes", AddMinutes);
    }
Exemple #3
0
    private void Start()
    {
        dialogueRunner = GetComponentInParent <DialogueRunner>();

        dialogueRunner.AddCommandHandler("npcSetFacing", NPCSetFacing);
        dialogueRunner.AddCommandHandler("npcMoveToX", NPCMoveToX);
    }
Exemple #4
0
    private void Start()
    {
        DialogueRunner runner = MainSingleton.Instance.dialogueRunner;

        runner.AddCommandHandler <string>("PlayMusic", PlayMusic);
        runner.AddCommandHandler <string, float>("PlaySoundEffect", PlaySoundEffect);
        runner.AddCommandHandler("StopMusic", StopMusic);
    }
Exemple #5
0
        void Awake()
        {
            runner = GetComponent <DialogueRunner>();
            runner.AddCommandHandler("Me", SetSenderMe);     // registers Yarn Command <<Me>>, which sets the current message sender to "Me"
            runner.AddCommandHandler("Them", SetSenderThem); // registers Yarn Command <<They>>, which sets the current message sender to "Them" (whoever the player is talking to)

            optionsContainer.SetActive(false);
        }
 // Start is called before the first frame update
 public void Awake()
 {
     dialogueRunner.AddCommandHandler("speakerEnd", NameEnd);
     dialogueRunner.AddCommandHandler("speakerUnknown", NameUnknown);
     dialogueRunner.AddCommandHandler("speakerKanna", NameKanna);
     dialogueRunner.AddCommandHandler("speakerThink", NameThink);
     dialogueRunner.AddCommandHandler("speakerFrag", NameFrag);
 }
Exemple #7
0
    private void Start()
    {
        DialogueRunner runner = MainSingleton.Instance.dialogueRunner;

        runner.AddCommandHandler <string, string>("Show", ShowCharacter);
        runner.AddCommandHandler <string, string>("Change", ChangeCharacterExpression);
        runner.AddCommandHandler <string>("Hide", HideCharacter);
    }
    private void Start()
    {
        dialogueRunner   = GetComponentInParent <DialogueRunner>();
        cameraController = GameObject.FindWithTag("MainCamera").GetComponent <CameraController>();

        dialogueRunner.AddCommandHandler("cameraStart", StartCutscene);
        dialogueRunner.AddCommandHandler("cameraEnd", EndCutscene);
        dialogueRunner.AddCommandHandler("changeCamera", ChangeCamera);
    }
    private void Start()
    {
        dialogueRunner = GetComponentInParent <DialogueRunner>();

        dialogueRunner.AddCommandHandler("playerSetState", SetPlayerState);
        dialogueRunner.AddCommandHandler("playerSetFacing", PlayerSetFacing);
        dialogueRunner.AddCommandHandler("playerMoveToX", PlayerMoveToX);
        dialogueRunner.AddCommandHandler("playerTetherToX", PlayerTetherToX);
        dialogueRunner.AddCommandHandler("playerUnTether", PlayerUnTether);
    }
Exemple #10
0
    void Start()
    {
        gameHandler    = GetComponent <GameHandler>();
        dialogueRunner = gameHandler.dialogueRunner;

        // Add the commands
        dialogueRunner.AddCommandHandler("musicNext", NextSong);
        dialogueRunner.AddCommandHandler("musicStop", StopSong);
        dialogueRunner.AddCommandHandler("musicContinue", ContinueSong);
    }
    private void Start()
    {
        gameHandler     = GetComponent <GameHandler>();
        _dialogueUI     = gameHandler.dialogueUI;
        _dialogueRunner = gameHandler.dialogueRunner;

        _dialogueRunner.AddCommandHandler("showBox", ShowDialogueBox);
        _dialogueRunner.AddCommandHandler("hideBox", HideDialogueBox);
        _dialogueRunner.AddCommandHandler("setBoxPosition", SetDialogueBoxPosition);
    }
Exemple #12
0
    private void Start()
    {
        // Init references
        gameHandler    = GetComponent <GameHandler>();
        dialogueRunner = gameHandler.dialogueRunner;

        // Add the Yarn commands
        dialogueRunner.AddCommandHandler("cgPrevious", PreviousCg);
        dialogueRunner.AddCommandHandler("cgSet", SetCg);

        dialogueRunner.AddCommandHandler("cgFadeBlackToNext", FadeBlackToNextCg);
    }
Exemple #13
0
    private void Start()
    {
        dialogueRunner = GetComponentInParent <DialogueRunner>();
        cinematicBars  = dialogueCanvas.GetComponent <CinematicBars>();
        yarnSetSprite  = GetComponent <YarnSetSprite>();

        dialogueRunner.AddCommandHandler("debugLog", DebugLog);
        dialogueRunner.AddCommandHandler("setSprite", SetSprite);
        dialogueRunner.AddCommandHandler("setCharactersCurrentSprite", SetCharactersCurrentSprite);
        dialogueRunner.AddCommandHandler("showCinematicBars", ShowCinematicBars);
        dialogueRunner.AddCommandHandler("hideCinematicBars", HideCinematicBars);
    }
Exemple #14
0
    private void Start()
    {
        DialogueRunner runner = MainSingleton.Instance.dialogueRunner;

        runner.AddCommandHandler <string, int>("Take", Take);
        runner.AddCommandHandler <string, int>("Drop", Drop);
        runner.AddFunction("has", delegate(string s)
        {
            ItemName item = Parse(s);
            return(inventory.ContainsKey(item) && inventory[item] > 0);
        });
    }
Exemple #15
0
        void Awake()
        {
            DialogueRunner dialogueRunner = FindObjectOfType <DialogueRunner>();

            dialogueRunner.AddCommandHandler("waitForMove", WaitForMove);

            dialogueRunner.AddCommandHandler("waitForDrinksServed", WaitForDrinksServed);

            dialogueRunner.AddCommandHandler("waitForRedButton", WaitForRedButton);
            dialogueRunner.AddCommandHandler("waitForMixer", WaitForMixer);
            dialogueRunner.AddCommandHandler("waitForGlassButton", WaitForGlassButton);
        }
Exemple #16
0
        private void Awake()
        {
            Assert.IsNotNull(puppetMaster);
            Assert.IsNotNull(dialogueRunner);

            dialogueRunner.AddCommandHandler("move", Move);
            dialogueRunner.AddCommandHandler("turn", Turn);
            //dialogueRunner.AddCommandHandler("face", Turn);

            // TODO Delete this
            dialogueRunner.AddCommandHandler("setTextureIndex", SetTexture);
        }
Exemple #17
0
 void Awake()
 {
     DialogueRunner.AddCommandHandler("ReceiveReply", ReceiveReply);
     DialogueRunner.AddCommandHandler("SetupQuestion", SetupQuestion);
     DialogueRunner.AddCommandHandler("SetupStatement", SetupStatement);
     DialogueRunner.AddCommandHandler("AskQuestion", AskQuestion);
     DialogueRunner.AddCommandHandler("MakeStatement", MakeStatement);
     questionTerm     = QuestionPanel.transform.GetChild(0).GetComponent <Dropdown>();
     questionVerb     = QuestionPanel.transform.GetChild(1).GetComponent <Dropdown>();
     questionObject   = QuestionPanel.transform.GetChild(2).GetComponent <Dropdown>();
     statementSubject = StatementPanel.transform.GetChild(0).GetComponent <Dropdown>();
     statementVerb    = StatementPanel.transform.GetChild(1).GetComponent <Dropdown>();
     statementObject  = StatementPanel.transform.GetChild(2).GetComponent <Dropdown>();
 }
Exemple #18
0
 // Start is called before the first frame update
 void Start()
 {
     dialogueRunner.AddCommandHandler("break", (string[] parameters) => {
         comms.AddLineBreak();
     }
                                      );
 }
Exemple #19
0
    private void Start()
    {
        DialogueRunner runner = MainSingleton.Instance.dialogueRunner;

        runner.AddCommandHandler <float>("SetTimer", SetTimer);
        SetTimer(DEFAULT_TIMER_SECONDS);
    }
 private void Awake()
 {
     if (dialogueRunner == null)
     {
         dialogueRunner = FindObjectOfType <DialogueRunner>();
     }
     dialogueRunner.AddCommandHandler("hideBox", HideBox);
 }
Exemple #21
0
 public void Awake()
 {
     // Create a new command called 'custom_wait', which waits for one second.
     dialogueRunner.AddCommandHandler(
         "custom_wait",
         CustomWait
         );
 }
Exemple #22
0
 private void Awake()
 {
     if (dialogueRunner == null)
     {
         dialogueRunner = FindObjectOfType <DialogueRunner>();
     }
     dialogueRunner.AddCommandHandler("cam", Cam);
 }
Exemple #23
0
 protected virtual void Awake()
 {
     if (dialogueRunner == null)
     {
         dialogueRunner = FindObjectOfType <DialogueRunner>();
     }
     dialogueRunner.AddCommandHandler(commandName, Command);
 }
Exemple #24
0
 public void Awake()
 {
     // Create a new command called 'camera_look', which looks at a target.
     dialogueRunner.AddCommandHandler(
         "decide_b", // the name of the command
         DecideB     // the method to run
         );
 }
Exemple #25
0
    private void Start()
    {
        DialogueRunner runner = MainSingleton.Instance.dialogueRunner;

        runner.AddCommandHandler <string>("Load", (str) => StartCoroutine(LoadSceneAdditiveWait(str)));
        SceneManager.sceneLoaded += OnSceneLoad;
        // Load start menu
        LoadSceneAdditive(startMenuScene);
    }
    void Start()
    {
        // Init references
        gameHandler    = GetComponent <GameHandler>();
        dialogueRunner = gameHandler.dialogueRunner;

        // Add the command
        dialogueRunner.AddCommandHandler("nextScene", NextScene);
    }
    private void Awake()
    {
        blackenPanelImage = blackenPanel.GetComponent <Image>();
        dimPanelImage     = dimPanel.GetComponent <Image>();

        InitializeYarnCommands();

        void InitializeYarnCommands()
        {
            dialogueRunner.AddCommandHandler(
                "BlackenIn",
                BlackenIn
                );

            dialogueRunner.AddCommandHandler(
                "BlackenOut",
                BlackenOut
                );
        }
    }
    private void Awake()
    {
        if (dialogueRunner == null)
        {
            dialogueRunner = FindObjectOfType <DialogueRunner>();
        }
        if (dui == null)
        {
            dui = FindObjectOfType <DialogueUI>();
        }

        dialogueRunner.AddCommandHandler("autoContinue", AutoGo);
    }
        private void Awake()
        {
            _dialogueUI     = FindObjectOfType <DialogueUI>();
            _dialogueRunner = FindObjectOfType <DialogueRunner>();
            _player         = GetComponent <PlayerController>();
            _controls       = new Controls();

            _controls.player.jump.performed        += ctx => _player.Jump();
            [email protected] += ctx => _dialogueUI.MarkLineComplete();
            _controls.game.exit.performed          += ctx => _dialogueRunner.StartDialogue("Quit");

            _dialogueRunner.AddCommandHandler(
                "Quit",
                Quit
                );
        }
    private void Awake()
    {
        animator            = this.GetComponent <Animator>();
        playerMovement      = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>();
        notificationManager = GameObject.FindGameObjectWithTag("Notification Manager").GetComponent <NotificationManager>();

        //links yarn commands to this class's methods
        dialogueRunner.AddCommandHandler("Speaker:", SetSpeaker);
        dialogueRunner.AddCommandHandler("SplashLeft:", SetSplashL);
        dialogueRunner.AddCommandHandler("SplashRight:", SetSplashR);
        dialogueRunner.AddCommandHandler("Bubble:", SetSpeechBubble);
        dialogueRunner.AddCommandHandler("Background:", SetBackground);
        dialogueRunner.AddCommandHandler("Size:", SetTextSize);
        dialogueRunner.AddCommandHandler("Notification:", ShowNotification);
    }