Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        hamAndHorScript = hamAndHorTrigger.GetComponent <HamletAndHoratioText>();

        if (hamAndHorScript.destroyHamlet)
        {
            Destroy(gameObject);
        }
    }
    void OnTriggerEnter(Collider activator)
    {
        romeoAndRosalineScript = romeoAndRosalineTrigger.GetComponent <RomeoAndRosalineText>();

        hamletAndHoratioScript = hamletAndHoratioTrigger.GetComponent <HamletAndHoratioText>();

        madOberonScript = madOberonTrigger.GetComponent <MadOberonText>();

        if ((romeoAndRosalineScript.unitedRomAndRos) && (hamletAndHoratioScript.unitedHamAndHor) && (!(madOberonScript.madOberon)))
        {
            firstHomeWallDown = true;
            uiText.text       = "Now that you've sufficiently saved those humans the trouble of this whole falling in love business, you're ready to go back home.";
        }
        else if (!(madOberonScript.madOberon))
        {
            firstHomeWallDown = false;
            uiText.text       = "This is the path that will lead back to your home, but do you really want to leave just yet? " +
                                "You've still got this magic flower, and there's so much fun to be had with it! " +
                                "There's probably loads of humans out there who could use your help!";
        }
    }