public void PianoRegi()
 {
     IM.HapAction();
     if (PianoReg)
     {
         //Fabric.EventManager.Instance.PostEvent("Piano1");
         //Fabric.EventManager.Instance.PostEvent("Pause");
         IM.hapText.text = "The music doesn't sound right, it's missing something.";
     }
     else if (PianoCard1)
     {
         //Fabric.EventManager.Instance.PostEvent("Pause");
         //Fabric.EventManager.Instance.PostEvent("Piano2");
         IM.hapText.text = "The music still doesn't sound quite right, the note's a little off.";
     }
     else if (PianoCard2)
     {
         //Fabric.EventManager.Instance.PostEvent("Pause");
         //Fabric.EventManager.Instance.PostEvent("Piano3");
         IM.hapText.text           = "The piano sounds in tune with the music box, and the fireplace has opened";
         FireplaceCollider.enabled = false;
         Pianokey.SetActive(true);
         GameObject.FindGameObjectWithTag("OseSpecial").gameObject.GetComponent <SpriteRenderer>().sprite = FireOpen;
         //FireClose = FireOpen;
     }
 }
Exemple #2
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.name == "Protoplayer")
     {
         print("osui triggeriin");
         IM.HapAction();
         IM.hapText.text = "Would you look at that, the slide has turned into a set of stairs!";
     }
 }
 public void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.name == "Protoplayer")
     {
         print("osui triggeriin");
         IM.HapAction();
         IM.hapText.text = "Wait a minute.. That door on the right, wasn't it closed earlier?";
     }
 }
Exemple #4
0
    public void PaintingInsert(inventoryItem item, int PosID)
    {
        print("Placing " + item.gameObject.name + " into position " + PosID);
        // merkkaa muistiin sijoitettu objekti oikealle paikalle
        if (placedPaintings[PosID])
        {
            Debug.LogError("TODO: handle placing painting on top of existing");
        }

        placedPaintings[PosID] = item;
        // käännä itemiä vastaava quad päälle
        // siirrä quad oikean paikan transformin paikalle
        foreach (var po in paintingVisuals)
        {
            if (po.item == item)
            {
                po.gameObject.SetActive(true);
                po.transform.position = paintingsTransforms[PosID].position;
                po.transform.rotation = paintingsTransforms[PosID].rotation;
                //paintingsTransforms[PosID].GetComponent<clickableObject>().takeActionAvailable = true;
                //paintingsTransforms[PosID].GetComponent<clickableObject>().pickupPrefab = item.gameObject;
                //var poPic = item.GetComponent<Sprite>();
                //poPic = item.GetComponentInChildren<Sprite>();
                po.transform.FindDeepChild("New Sprite").GetComponent <SpriteRenderer>().sprite = item.itemSprite;
            }
        }
        bool solved = true;

        for (int i = 0; i < solutionsPaintings.Count; i++)
        {
            if (placedPaintings[i] != solutionsPaintings[i])
            {
                solved = false;
                break;
            }
        }
        if (!solv && solved)
        {
            solv = true;
            puzzleComplete.Invoke();
            //Fabric.EventManager.Instance.PostEvent("Pause");
            //Fabric.EventManager.Instance.PostEvent("Creak");
            IM.HapAction();
            IM.hapText.text = "I heard a click and some rumbling coming from the lobby!";
        }
    }