void OnDrag(Vector2 v) { if (!m_hasSendSound) { m_hasSendSound = true; EventDispatcher.TriggerEvent(SettingEvent.UIDownPlaySound, m_myDCamera.name); } if (m_bDraging == false) { m_vec2Drag = v; m_vec3DragBegin = Input.mousePosition; m_bDraging = true; UIButtonTween[] btList = transform.GetComponentsInChildren <UIButtonTween>(true); if (btList.Length > 0) { btList[0].enabled = false; } m_vec2AloneMoveSpeed = v; //m_myDCamera.AloneMove(v); } float length; if (m_myDCamera.IsHorizontal) { //length = Input.mousePosition.x - m_vec3DragBegin.x; length = v.x; } else { //length = Input.mousePosition.y - m_vec3DragBegin.y; length = v.y; } m_myDCamera.DraggingMove(length); }