Beispiel #1
0
    public void _Adventure(string questlog)
    {
        speak.textoptions    = new string[1];     //This is for the openeing texts of adventure
        speak.textoptions[0] = questlog;

        speak.line = 0;
        speak.popspeach();
    }
Beispiel #2
0
    void OnTriggerStay2D(Collider2D _player)
    {
        if (_player.gameObject.name == "Player")           //IF the object that presses 'right click' is the player then show dialouge
        {
            if (Input.GetMouseButtonUp(1))
            {
                //speak.popbox (WhatToSay);
                //

                if (!speak.on)                   //If the dialouge box is not active
                {
                    speak.textoptions = lines;
                    speak.line        = 0;               //Starts at line 0 and moves to line n
                    speak.popspeach();                   //"Pops" the line for dialouge...Not really a true pop.
                }

                if (GetComponentInParent <nonplayermove>() != null)               //IF the object the player clicks on is an npc, the npc cant walk... This allows for looking at objects without needing to give it a move speed
                {
                    GetComponentInParent <nonplayermove>().notalking = false;
                }
            }
        }
    }