Beispiel #1
0
 public override void LateUpdate()
 {
     if (enabled)
     {
         if (containsMouse)
         {
             if (!hovering)
             {
                 Enter?.Invoke(this);
                 hovering = true;
             }
             else
             {
                 Stay?.Invoke(this);
             }
         }
         else if (hovering)
         {
             Exit?.Invoke(this);
             hovering = false;
         }
     }
 }
 private void OnCollisionStay(Collision other)
 {
     Stay?.Invoke(other);
 }
 private void OnTriggerStay(Collider other)
 {
     Stay?.Invoke(other);
 }
 private void OnCollisionStay(Collision collision)
 {
     Stay?.Invoke(collision);
 }