Working drag, tap, open sequence, looking pretty OK

This commit is contained in:
Michal Pikulski
2025-11-06 19:31:33 +01:00
parent 1b1ea65744
commit 774f27410a
5 changed files with 239 additions and 463 deletions

View File

@@ -445,6 +445,11 @@ namespace UI.DragAndDrop.Core
if (RectTransform != null)
{
// Pop-in animation: start slightly scaled down, then bounce to normal
Vector3 startScale = transform.localScale * 0.8f;
transform.localScale = startScale;
Tween.LocalScale(transform, Vector3.one, snapDuration, 0f, Tween.EaseOutBack);
Tween.LocalPosition(RectTransform, targetLocalPos, snapDuration, 0f, Tween.EaseOutBack);
Tween.LocalRotation(transform, Quaternion.identity, snapDuration, 0f, Tween.EaseOutBack);
}

View File

@@ -153,6 +153,14 @@ namespace UI.DragAndDrop.Core
return _slots[index];
}
/// <summary>
/// Check if this container contains the specified slot
/// </summary>
public bool HasSlot(DraggableSlot slot)
{
return _slots.Contains(slot);
}
/// <summary>
/// Update the layout of all slots based on layout type
/// </summary>