Example #1
0
 void EnableExpandableObject()
 {
     if (expandableObj != null)
     {
         ExpandOnHighlight eoh = (ExpandOnHighlight)expandableObj.GetComponent <ExpandOnHighlight>();
         if (eoh != null)
         {
             eoh.timer = float.MinValue;
         }
         // Debug.Log("Enabling " + gameObject.name);
         expandableObj.SetActive(true);
         if (follow)
         {
             expandableObj.transform.position = transform.position + offset;
         }
     }
 }
Example #2
0
 void DisableExpandableObject()
 {
     if (expandableObj != null && !highlighted)
     {
         ExpandOnHighlight eoh = (ExpandOnHighlight)expandableObj.GetComponent <ExpandOnHighlight>();
         if (eoh != null)
         {
             if (!eoh.IsHighlighted())
             {
                 // Debug.Log("Disabling " + gameObject.name);
                 expandableObj.SetActive(false);
             }
         }
         else
         {
             expandableObj.SetActive(false);
         }
     }
 }