// Update is called once per frame
    void Update()
    {
        goingHomeScript = goingHomeTrigger.GetComponent <GoingHome>();

        if (goingHomeScript.firstHomeWallDown)
        {
            Destroy(gameObject);
        }
    }
示例#2
0
    void OnTriggerEnter(Collider activator)
    {
        goingHomeScript = goingHomeTrigger.GetComponent <GoingHome>();
        opheliaScript   = opheliaTrigger.GetComponent <OpheliaText>();

        if (opheliaScript.hasOphelia)
        {
            Destroy(gameObject);
        }

        else if (goingHomeScript.firstHomeWallDown)
        {
            uiText.text = "The person Hamlet is supposed to fall in love with is in here. Looks like you do absolutely have to do this maze.";
        }
        else
        {
            uiText.text = "This maze looks awful. You don't want to go in there unless you absolutely have to.";
        }
    }
    void OnTriggerEnter(Collider activator)
    {
        goingHomeScript = goingHomeTrigger.GetComponent <GoingHome>();
        julietScript    = julietTrigger.GetComponent <JulietText>();

        if (julietScript.hasJuliet)
        {
            Destroy(gameObject);
        }

        else if (goingHomeScript.firstHomeWallDown)
        {
            uiText.text = "There's the person Romeo is supposed to fall in love with. You'd better go get her!";
        }
        else
        {
            uiText.text = "She looks busy. You don't want to bother her right now.";
        }
    }