Beispiel #1
0
    IEnumerator keyPicked()
    {
        KeyMod.SetActive(false);
        LockMod.SetActive(false);
        KeyIcon.SetActive(true);
        LockIcon.SetActive(true);
        ObjectText.SetActive(false);
        talkText.GetComponent <Text>().text = "A key and a lockpick !\n Now i can open that door";
        yield return(new WaitForSeconds(5));

        talkText.GetComponent <Text>().text = "";
        ObjectText.transform.GetChild(0).GetComponent <Text>().text = "Open the house door with the key";
        ObjectText.SetActive(true);
    }
Beispiel #2
0
    IEnumerator key_2Picked()
    {
        ghostDisabler.SetActive(true);
        key2Mod.SetActive(false);
        KeyIcon.SetActive(true);
        ObjectText.SetActive(false);
        talkText.GetComponent <Text>().text = "Another key,\nlets open the door with this one";
        yield return(new WaitForSeconds(1));

        Flight.GetComponent <LightFlicker>().enabled = true;
        yield return(new WaitForSeconds(4));

        talkText.GetComponent <Text>().text = "";
        ObjectText.transform.GetChild(0).GetComponent <Text>().text = "Open the house door with the key";
        ObjectText.SetActive(true);
    }