|
@@ -14,11 +14,11 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
|
|
|
}
|
|
|
|
|
|
- InputDevicePartBase NowPart ;
|
|
|
+ InputDevicePartBase NowPart;
|
|
|
|
|
|
private void upEvent(InputKeyCode keyCode, InputDevicePartBase part)
|
|
|
{
|
|
|
- if(part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject!=null&& part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject.GetComponent<BoxCollider>()==null)
|
|
|
+ if (part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject != null && part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject.GetComponent<BoxCollider>() == null)
|
|
|
{
|
|
|
checkMoveUp(part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject, part);
|
|
|
}
|
|
@@ -27,12 +27,13 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
|
|
|
public void checkMoveUp(GameObject obj, InputDevicePartBase part)
|
|
|
{
|
|
|
- if(obj)
|
|
|
+ if (obj)
|
|
|
{
|
|
|
ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
|
|
|
- if(m!=null)
|
|
|
+ if (m != null)
|
|
|
{
|
|
|
- m.OnPointerUp(part.inputDataBase.SCPointEventData);
|
|
|
+ if (!m.isParentDrag)
|
|
|
+ m.OnPointerUp(part.inputDataBase.SCPointEventData);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -58,7 +59,8 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
|
|
|
if (m != null)
|
|
|
{
|
|
|
- m.OnPointerDown(part.inputDataBase.SCPointEventData);
|
|
|
+ if (!m.isParentDrag)
|
|
|
+ m.OnPointerDown(part.inputDataBase.SCPointEventData);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -72,7 +74,7 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
|
|
|
void Update()
|
|
|
{
|
|
|
- if (NowPart!=null&&NowPart.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject != null && NowPart.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject.GetComponent<BoxCollider>() == null)
|
|
|
+ if (NowPart != null && NowPart.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject != null && NowPart.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject.GetComponent<BoxCollider>() == null)
|
|
|
{
|
|
|
|
|
|
checkMoveDrag(NowPart.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject, NowPart);
|
|
@@ -86,12 +88,13 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
|
|
|
if (m != null)
|
|
|
{
|
|
|
- m.OnDrag(part.inputDataBase.SCPointEventData);
|
|
|
+ if (!m.isParentDrag)
|
|
|
+ m.OnDrag(part.inputDataBase.SCPointEventData);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if(obj.transform.parent!=null)
|
|
|
- checkMoveDrag(obj.transform.parent.gameObject, part);
|
|
|
+ if (obj.transform.parent != null)
|
|
|
+ checkMoveDrag(obj.transform.parent.gameObject, part);
|
|
|
}
|
|
|
}
|
|
|
}
|