예제 #1
0
    public override IEnumerator RunCommand(Yarn.Command command)
    {
        string[] commandSplit = command.text.Split(' ');

        if (commandSplit[0] == "hideui")
        {
            dialogueUIFrame.SetActive(false);
            yield return(null);
        }
        else if (commandSplit[0] == "wait")
        {
            float seconds = 0.0f;
            float.TryParse(commandSplit[1], out seconds);
            yield return(new WaitForSeconds(seconds));
        }
        else if (command.text == "protag_passed_out_eyes_closed")
        {
            player.AnimatePassedOut();
            yield return(null);
        }
        else if (command.text == "protag_passed_out_eyes_open")
        {
            player.AnimatePassedOutEyesOpen();
            yield return(null);
        }
        else if (command.text == "protag_idle")
        {
            player.AnimateIdle();
            yield return(null);
        }
        else if (command.text == "protag_still")
        {
            player.AnimateStill();
            yield return(null);
        }
        else if (command.text == "protag_smoke")
        {
            Debug.Log("dialogue says to smoke");
            player.AnimateSmoking();
            yield return(null);
        }
        else if (command.text == "protag_vom")
        {
            yield return(player.AnimateVom());
        }
        else if (command.text == "logan_put_out_cig")
        {
            yield return(logan.AnimatePutOutCig());
        }
        else if (command.text == "logan_pull_out_gun")
        {
            yield return(logan.AnimatePullOutGun());
        }
        else if (command.text == "loop")
        {
            dialogueUIFrame.SetActive(false);
            runner.Stop();
            yield return(gameCoordinator.ShootAndLoop());
        }
        else if (command.text == "win")
        {
            dialogueUIFrame.SetActive(false);
            runner.Stop();
            yield return(gameCoordinator.Win());
        }
    }