Beispiel #1
0
    public override void takeAction()
    {
        chatWindow.GetComponent <Image>().enabled = true;
        foreach (BoxCollider2D box in chatWindow.GetComponents <BoxCollider2D>())
        {
            box.enabled = true;
        }
        //chatWindow.GetComponent<BoxCollider2D>().enabled = true;
        chatWindow.GetComponentInChildren <Text>().enabled = true;

        s.addStrings(lines);
        s.endedResponse    = endedResponse;
        s.lettersPerSecond = lettersPerSecond;

        if (closeOnClick)
        {
            try{ GameObject.FindGameObjectWithTag("NotepadHints").SetActive(false); }catch (NullReferenceException e) {}
            try{ GameObject.FindGameObjectWithTag("NotepadNotes").SetActive(false); }catch (NullReferenceException e) {}
            try{ GameObject.FindGameObjectWithTag("File").SetActive(false); }catch (NullReferenceException e) {}
            GameObject.FindGameObjectWithTag("Map").GetComponent <MoveToTools>().MoveToOriginalLocation();
            GameObject.FindGameObjectWithTag("ToolRack").GetComponent <MoveToTools>().MoveToOriginalLocation();
        }
    }