|
@@ -15,13 +15,15 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
}
|
|
|
|
|
|
InputDevicePartBase NowPart;
|
|
|
+ GameObject pz;
|
|
|
|
|
|
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 || part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject.GetComponent<ManipulationHandler>() == null))
|
|
|
{
|
|
|
- checkMoveUp(part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject, part);
|
|
|
+ checkMoveUp(pz, part);
|
|
|
}
|
|
|
+ pz = null;
|
|
|
NowPart = null;
|
|
|
}
|
|
|
|
|
@@ -32,12 +34,15 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
|
|
|
if (m != null)
|
|
|
{
|
|
|
- if (!m.isParentDrag)
|
|
|
+ if (!m.isParentDrag && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
|
|
|
+ {
|
|
|
m.OnPointerUp(part.inputDataBase.SCPointEventData);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (obj.transform.parent != null && !obj.name.Contains("Root"))
|
|
|
+ if (obj.transform.parent != null && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
|
|
|
checkMoveUp(obj.transform.parent.gameObject, part);
|
|
|
}
|
|
|
}
|
|
@@ -45,7 +50,7 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
|
|
|
private void downEvent(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 || part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject.GetComponent<ManipulationHandler>() == null))
|
|
|
{
|
|
|
checkMoveDown(part.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject, part);
|
|
|
}
|
|
@@ -59,12 +64,15 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
|
|
|
if (m != null)
|
|
|
{
|
|
|
- if (!m.isParentDrag)
|
|
|
+ if (!m.isParentDrag && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
|
|
|
+ {
|
|
|
m.OnPointerDown(part.inputDataBase.SCPointEventData);
|
|
|
+ pz = obj;
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (obj.transform.parent != null && !obj.name.Contains("Root"))
|
|
|
+ if (obj.transform.parent != null && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
|
|
|
checkMoveDown(obj.transform.parent.gameObject, part);
|
|
|
}
|
|
|
}
|
|
@@ -74,10 +82,10 @@ 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 && pz != null)
|
|
|
{
|
|
|
|
|
|
- checkMoveDrag(NowPart.inputDataBase.SCPointEventData.pointerCurrentRaycast.gameObject, NowPart);
|
|
|
+ checkMoveDrag(pz, NowPart);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -86,15 +94,18 @@ public class AllMoveEvent : MonoBehaviour
|
|
|
if (obj)
|
|
|
{
|
|
|
ManipulationHandler m = obj.GetComponent<ManipulationHandler>();
|
|
|
- if (m != null)
|
|
|
+ if (m != null && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
|
|
|
{
|
|
|
if (!m.isParentDrag)
|
|
|
m.OnDrag(part.inputDataBase.SCPointEventData);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (obj.transform.parent != null && !obj.name.Contains("Root"))
|
|
|
+ if (obj.transform.parent != null && !obj.name.Contains("Root") && !obj.name.Contains("BoundingBox"))
|
|
|
+ {
|
|
|
+
|
|
|
checkMoveDrag(obj.transform.parent.gameObject, part);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|