private void moveTarget(Vector3 dest) { SpringPosition sp = SpringPosition.Begin(target.gameObject, dest, 5f); sp.ignoreTimeScale = true; sp.worldSpace = false; DragXPostion xData = new DragXPostion(); xData.moved = true; xData.x = dest.x; target.SendMessage(x_postion_notify_name, xData, SendMessageOptions.DontRequireReceiver); }
private void stopTarget() { SpringPosition sp = target.GetComponent <SpringPosition>(); if (sp != null) { sp.enabled = false; } DragXPostion xData = new DragXPostion(); xData.moved = false; target.SendMessage(x_postion_notify_name, xData, SendMessageOptions.DontRequireReceiver); }
// page Start LastMoveX void OnDragLastMoveX(DragXPostion xData) { moveStart = xData.moved; lastPostionX = xData.x; }