コード例 #1
0
 void OnTriggerExit(Collider other)
 {
     // Controller for Simulator, Side for HTC Vive
     if (myObject == null)
     {
         return;
     }
     if (other.name.Contains("Controller") || other.name.Contains("Side"))
     {
         cnt--;
         if (cnt <= 0)
         {
             show = false;
             ShowNameOnTouch.FreeText(myObject);
         }
     }
     else
     {
         UCE_Heatable heatable = other.GetComponent <UCE_Heatable>();
         if (heatable && heatable.type == UCE_Heatable.Type.Normal)
         {
             insideHeatable = null;
         }
     }
 }
コード例 #2
0
 void OnTriggerExit(Collider other)
 {
     if (type == Type.Burner)
     {
         UCE_Heatable heatable = other.GetComponent <UCE_Heatable>();
         if (heatable)
         {
             heatable.isHeating = false;
             childHeatable      = null;
         }
     }
 }
コード例 #3
0
 void OnTriggerEnter(Collider other)
 {
     if (type == Type.Burner)
     {
         UCE_Heatable heatable = other.GetComponent <UCE_Heatable>();
         if (heatable)
         {
             // This is required because the following corner case can happen:
             // Enter -> Enter -> Exit -> Exit
             if (childHeatable)
             {
                 childHeatable.isHeating = false;
                 childHeatable           = null;
             }
             childHeatable = heatable;
             if (isHeating == true)
             {
                 heatable.isHeating = false;
             }
         }
     }
 }
コード例 #4
0
 void OnTriggerEnter(Collider other)
 {
     // Controller for Simulator, Side for HTC Vive
     if (other.name.Contains("Controller") || other.name.Contains("Side"))
     {
         cnt++;
         // When using dropper, this function might be triggered twice in a row,
         // so we need this to ensure the name text before can disapper properly
         if (show)
         {
             return;
         }
         myObject = ShowNameOnTouch.AllocateText();
         show     = true;
     }
     else
     {
         UCE_Heatable heatable = other.GetComponent <UCE_Heatable>();
         if (heatable && heatable.type == UCE_Heatable.Type.Normal)
         {
             insideHeatable = heatable;
         }
     }
 }
コード例 #5
0
 // Use this for initialization
 void Start()
 {
     heatable    = transform.GetComponent <UCE_Heatable>();
     airTransmit = transform.GetComponent <AirTransmit>();
 }
コード例 #6
0
 public static void Register(UCE_Heatable heatable)
 {
     burner = heatable;
 }