void OnDragEnd(EntryIcon entry) { var anchor = _dragging.GetRectTransform().GetProportionalPositionToParent(); anchor += new Vector2(0.5f, 0.5f); _dragging.GetRectTransform().SetAnchorAndAnchoredPositionToZero(anchor); _dragging = null; foreach (var myEntry in _entries) myEntry.JustSetIdx(_idxMapper(myEntry.Idx)); Party._.Reorder(idx => _idxMapper(idx)); _entries.Sort((a, b) => b.Idx - a.Idx); _idxMapper = idx => idx; }
void OnDragBegin(EntryIcon entry) { _dragging = entry; }