示例#1
0
 void SetInteract(Interactable obj)
 {
     //If the focus isn't already on this object
     if (obj != focus)
     {
         //If the previous focus is not null, remove it
         if (focus != null)
         {
             focus.DenyInteract();
         }
         focus = obj; //Set the focus to the new object
     }
     obj.AllowInteract(transform);
 }