Browse Source

Dragged objects do not return to start position if drag action

completes.
master
chrisgregan 10 years ago
parent
commit
5e47179899
  1. 9
      Assets/Fungus/Sprite/Scripts/Draggable2D.cs

9
Assets/Fungus/Sprite/Scripts/Draggable2D.cs

@ -81,12 +81,13 @@ namespace Fungus
{ {
handler.OnDragCancelled(this); handler.OnDragCancelled(this);
} }
}
if (returnToStartPos) if (returnToStartPos)
{ {
iTween.MoveTo(gameObject, startingPosition, returnDuration); iTween.MoveTo(gameObject, startingPosition, returnDuration);
}
} }
} }
protected virtual void OnTriggerEnter2D(Collider2D other) protected virtual void OnTriggerEnter2D(Collider2D other)

Loading…
Cancel
Save