summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/StandaloneInputModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/StandaloneInputModule.cs')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/StandaloneInputModule.cs28
1 files changed, 17 insertions, 11 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/StandaloneInputModule.cs b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/StandaloneInputModule.cs
index f9a2f77..7db371a 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/StandaloneInputModule.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/EventSystem/InputModules/StandaloneInputModule.cs
@@ -141,16 +141,16 @@ namespace UnityEngine.EventSystems
default:
return false;
}
- }
-
- //c �����������
+ }
+
+ //c! ����ֻ�������λ��
public override void UpdateModule()
{
- // ���û�л�ȡ���㣬�Һ���û�н���ʱ���¼������أ����ǿ���Զ�����ӣ������������
+ // ���û�л�ȡ���㣬�Һ���û�н���ʱ���¼������أ����ǿ���Զ�����ӣ������������
if (!eventSystem.isFocused && ShouldIgnoreEventsOnNoFocus())
return;
- // ��������
+ // ��������
m_LastMousePosition = m_MousePosition;
m_MousePosition = input.mousePosition;
}
@@ -201,16 +201,17 @@ namespace UnityEngine.EventSystems
ClearSelection();
}
- //c input module�¼����������
+ //c! input module�¼���������ڣ�ÿ֡����
public override void Process()
{
- if (!eventSystem.isFocused && ShouldIgnoreEventsOnNoFocus()) // ���û�л�ȡ���㣬����Ҫ����
+ // ���û�л�ȡ���㣬����Ҫ����
+ if (!eventSystem.isFocused && ShouldIgnoreEventsOnNoFocus())
return;
//event ��ѡ�еĶ��󷢲������¼�
bool usedEvent = SendUpdateEventToSelectedObject();
- // ��������ˣ�����move , submit, cancel�¼�
+ // ���������Send Navigation Events������move , submit, cancel�¼�
if (eventSystem.sendNavigationEvents)
{
if (!usedEvent)
@@ -222,10 +223,10 @@ namespace UnityEngine.EventSystems
// ģ�ⴥ�����������
// touch needs to take precedence because of the mouse emulation layer
- usedEvent = ProcessTouchEvents(); //event ���������¼�
+ usedEvent = ProcessTouchEvents(); //event �����Ļ������PC��û��
if(!usedEvent && input.mousePresent)
- ProcessMouseEvent();
+ ProcessMouseEvent(); // ��������¼�
}
//c �����¼�
@@ -233,6 +234,8 @@ namespace UnityEngine.EventSystems
{
for (int i = 0; i < input.touchCount; ++i) //��㴥��
{
+ Debug.Log("Touch");
+
Touch touch = input.GetTouch(i);
if (touch.type == TouchType.Indirect)
@@ -240,7 +243,8 @@ namespace UnityEngine.EventSystems
bool released; // ����һ����ָ̧�����
bool pressed; // ����һ����ָ���²���
- var pointer = GetTouchPointerEventData(touch, out pressed, out released); // ���߼�Ⲣ��������
+ //
+ PointerEventData pointer = GetTouchPointerEventData(touch, out pressed, out released); // ���߼�Ⲣ��������
// ����������̧�������Ѿ�׼�����˱�����������
ProcessTouchPress(pointer, pressed, released);
@@ -495,6 +499,7 @@ namespace UnityEngine.EventSystems
}
}
+ // ÿ֡����һ��OnUpdateSelected�¼�
protected bool SendUpdateEventToSelectedObject()
{
if (eventSystem.currentSelectedGameObject == null)
@@ -506,6 +511,7 @@ namespace UnityEngine.EventSystems
return data.used;
}
+ // ������갴���¼���������Ϣ�����ûص�
/// <summary>
/// Process the current mouse press.
/// </summary>