Compare commits

..

No commits in common. "1b282e3c15da94b1558eb473f49791c780db48a9" and "35f5928e8e7e655a2854b5821a683d7aabe9f313" have entirely different histories.

7 changed files with 5 additions and 61 deletions

View File

@ -49,11 +49,6 @@ namespace GCSeries.Core.Input
{
}
[Serializable]
public class CollisionClickEvent : UnityEvent<ZPointer, int, GameObject>
{
}
////////////////////////////////////////////////////////////////////////
// Inspector Fields
////////////////////////////////////////////////////////////////////////
@ -175,11 +170,6 @@ namespace GCSeries.Core.Input
[Tooltip("Event dispatched when the pointer exits an object.")]
public CollisionEvent OnObjectExited = new CollisionEvent();
[Tooltip("µã»÷ÁËÎïÌå")]
public CollisionClickEvent OnClick = new CollisionClickEvent();
/// <summary>
/// Event dispatched when a pointer button becomes pressed.
/// </summary>
@ -736,10 +726,6 @@ namespace GCSeries.Core.Input
if (this._buttonState[i].BecamePressed)
{
this.OnButtonPressed.Invoke(this, i);
if (_hitInfo.gameObject != null)
{
this.OnClick.Invoke(this, i, _hitInfo.gameObject);
}
}
if (this._buttonState[i].BecameReleased)

View File

@ -372,7 +372,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
EventCamera: {fileID: 263436429275714491}
Visualization: {fileID: 7822688151064336048}
MaxHitDistance: 1.5
MaxHitDistance: 0.75
MaxHitRadius: 0
IgnoreMask:
serializedVersion: 2
@ -392,9 +392,6 @@ MonoBehaviour:
OnObjectExited:
m_PersistentCalls:
m_Calls: []
OnClick:
m_PersistentCalls:
m_Calls: []
OnButtonPressed:
m_PersistentCalls:
m_Calls: []
@ -1586,7 +1583,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
EventCamera: {fileID: 263436429275714491}
Visualization: {fileID: 6603607056250446267}
MaxHitDistance: 1.5
MaxHitDistance: 0.3
MaxHitRadius: 0
IgnoreMask:
serializedVersion: 2
@ -1606,9 +1603,6 @@ MonoBehaviour:
OnObjectExited:
m_PersistentCalls:
m_Calls: []
OnClick:
m_PersistentCalls:
m_Calls: []
OnButtonPressed:
m_PersistentCalls:
m_Calls: []

View File

@ -90,9 +90,6 @@ namespace QFramework
break;
}
}
#if VR
effect.constantWidth = false;
#endif
}
else
{

View File

@ -58,9 +58,9 @@ public class MoveAction : IAction
{
obj = UIRoot.Instance.transform.Find("ZFrame").gameObject;
}
#endif
#else
obj = Utility.FindObj(path);
#endif
if (obj == null)
{
Debug.LogError($"没有找到路径{path}");

View File

@ -1,4 +1,3 @@
using GCSeries.Core.Input;
using System;
using System.Collections.Generic;
using System.IO;
@ -18,7 +17,6 @@ namespace QFramework
string path;
string deviceName;
bool isRight;
public static ObjClickCondition Allocate(string path, Dictionary<string, string> datas)
{
var conditionAction = mSimpleObjectPool.Allocate();
@ -51,9 +49,6 @@ namespace QFramework
}
}
}
#if VR
#else
if (Input.GetMouseButtonUp(0) && EventSystem.current.IsPointerOverGameObject() == false)
{
Vector3 mousePos = Input.mousePosition;
@ -71,7 +66,7 @@ namespace QFramework
}
}
}
#endif
return false;
}
@ -81,22 +76,7 @@ namespace QFramework
public ActionStatus Status { get; set; }
public void OnStart()
{
#if VR
UIRoot.Instance.transform.Find("ZMouse").GetComponent<ZPointer>().OnClick.AddListener(OnClick);
UIRoot.Instance.transform.Find("ZStylus").GetComponent<ZPointer>().OnClick.AddListener(OnClick);
#endif
}
#if VR
public void OnClick(ZPointer pointer, int index, GameObject obj)
{
if (this.obj != null && obj == this.obj)
{
this.Finish();
UIRoot.Instance.transform.Find("ZMouse").GetComponent<ZPointer>().OnClick.RemoveListener(OnClick);
UIRoot.Instance.transform.Find("ZStylus").GetComponent<ZPointer>().OnClick.RemoveListener(OnClick);
}
}
#endif
public void OnExecute(float dt)
{

View File

@ -28,19 +28,9 @@ namespace QFramework
{
if (obj == null)
{
#if VR
if (uiPath.Contains("UIRoot/"))
{
uiPath = uiPath.Replace("UIRoot/", "UIRoot/ZCameraRig/ZCanvas/");
}
#endif
obj = Utility.FindObj(uiPath);
}
#if VR
if (obj != null && Input.GetMouseButtonUp(0))
#else
if (obj != null && Input.GetMouseButtonUp(0) && EventSystem.current.IsPointerOverGameObject())
#endif
{
return obj == EventSystem.current.currentSelectedGameObject;
}

View File

@ -22,9 +22,6 @@ public class DeviceItem : MonoBehaviour
effect.outlineColor = Utility.ToColor(device.HighColor);
StringEventSystem.Global.Register<string[]>(Global.HighLightTrigger, OnHighLightTriggerEvent);
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
#if VR
effect.constantWidth = false;
#endif
}
if (device.MeshCollider)
{