Beispiel #1
0
 public void AddComponent(ResizableUIComponent resizableUIObject, Transform raycastTargetTransform)
 {
     if (!_resizableComponentsAndTargetTransforms.ContainsKey(resizableUIObject))
     {
         _resizableComponentsAndTargetTransforms.Add(resizableUIObject, new List <Transform>());
     }
     _resizableComponentsAndTargetTransforms[resizableUIObject].Add(raycastTargetTransform);
 }
Beispiel #2
0
 private void ChangeSelectedObject(ResizableUIComponent resizableUIComponent)
 {
     if (!resizableUIComponent.IsSelected)
     {
         foreach (KeyValuePair <ResizableUIComponent, List <Transform> > kvp in _resizableComponentsAndTargetTransforms)
         {
             kvp.Key.Select(kvp.Key == resizableUIComponent);
         }
     }
 }
Beispiel #3
0
 void IDragHandler.OnDrag(PointerEventData eventData)
 {
     ResizableUIComponent.UpdateSize(this, (Vector2)transform.position - eventData.position);
 }