void Start() { DragHandler.Get(relocatingObj).OnDragAction.AddListener(OnDrag); #region rejectfix fix = RelativeFix.Get(img.transform); DragHandler dh = DragHandler.Get(img.gameObject); dh.OnEndAction.AddListener((ped) => { fix.RejectFixPos(img.transform.parent as RectTransform); }); dh.OnDragAction.AddListener((ped) => { //mapContainer.transform.localPosition += ped.delta Vector2 pos = img.transform.localPosition; pos += ped.delta; img.transform.localPosition = pos; }); #endregion }
private void Start() { DragHandler.Get(gameObject).OnBeginAction.AddListener(OnBeginDrag); DragHandler.Get(gameObject).OnDragAction.AddListener(OnDrag); }
void Start() { DragHandler.Get(gameObject).OnDragAction.AddListener(OnDrag); }