Esempio n. 1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.tag == "Pillar")
     {
         isPillar     = false;
         pillarScript = null;
         putLocation  = Vector2.zero;
     }
     if (other.tag == "Item")
     {
         onItem = false;
         temp   = null;
     }
 }
Esempio n. 2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "Item" && isHolding == false)
        {
            onItem = true;
            temp   = other.gameObject;
        }

        if (other.tag == "Pillar")
        {
            isPillar       = true;
            pillarScript   = other.GetComponent <PuzzlePillar>();
            putLocation    = other.transform.position; //set the orb location
            putLocation.y += offSetY;                  // offset the y
        }
    }