PO/Library/Artifacts/9c/9c2e2b1329fb691375653193a1e...

273 lines
13 KiB
Plaintext
Raw Normal View History

2022-01-12 10:06:03 +03:00
<0F>2<>2019.4.19f1<00><><EFBFBD><EFBFBD> <00><>f<EFBFBD><66>!<21>5<>9<EFBFBD>4Q<0E><>B<00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00> E<00> <00><00>#<00>.<00>,<00>5a<00> <00><00>#<00>.<00>,<00><00><00>r<00> <00><00># <00>.<00>,
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00><00><00>J<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><00>\<00><00><><EFBFBD><EFBFBD><EFBFBD><00>H<00>r<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00>w<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00>#!<00>.<00>,"<00><00><><00><><EFBFBD><EFBFBD>#@1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>$<00><00><00>%.<00>j<00>&<00><00><><00><><EFBFBD><EFBFBD>'<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>(<00><00><00><00>)<00>j<00><><EFBFBD><EFBFBD><EFBFBD>*<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD>+<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>,@<00><00><00>-Q<00>j<00>.y<00>
<00> /<00><00>#0<00>.<00>,1<00> <00><>2@<00><00><> 3@<00><00>#4<00>.<00>,5<00>H<00><><00><><EFBFBD><EFBFBD>6<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>7@<00><00><00>8Q<00>j<00>9H<00><><00><><EFBFBD><EFBFBD>:<01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>;@<00><00><00><Q<00>j<00>=H<00><><00><><EFBFBD><EFBFBD>><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>?@<00><00><00>@Q<00>j<00>AMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariants<00><><EFBFBD>G<EFBFBD><47>܏Z56<35>:!@i<>J*<00><00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00>E<00> <00><00><00>.<00><00>(a<00> <00><00><00>.<00><00><00><00>r<00> <00><00> <00>.<00>
<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00> Q<00>j<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00><00><00>=<00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><01><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><01>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00><00>.<00><00>y<00>Q <00><00><00>.<00> <00><00><00>X!H<00>i<00><><EFBFBD><EFBFBD>"<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>#@<00><00><00>$Q<00>j<00>%H<00>u<00><><EFBFBD><EFBFBD>&<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>'@<00><00><00>(Q<00>j<00>)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespace\<00>y<EFBFBD>`t"<00>y<EFBFBD>PointerEventData<74>!using System;
using System.Text;
using System.Collections.Generic;
namespace UnityEngine.EventSystems
{
/// <summary>
/// Each touch event creates one of these containing all the relevant information.
/// </summary>
public class PointerEventData : BaseEventData
{
/// <summary>
/// Input press tracking.
/// </summary>
public enum InputButton
{
/// <summary>
/// Left button
/// </summary>
Left = 0,
/// <summary>
/// Right button.
/// </summary>
Right = 1,
/// <summary>
/// Middle button
/// </summary>
Middle = 2
}
/// <summary>
/// The state of a press for the given frame.
/// </summary>
public enum FramePressState
{
/// <summary>
/// Button was pressed this frame.
/// </summary>
Pressed,
/// <summary>
/// Button was released this frame.
/// </summary>
Released,
/// <summary>
/// Button was pressed and released this frame.
/// </summary>
PressedAndReleased,
/// <summary>
/// Same as last frame.
/// </summary>
NotChanged
}
/// <summary>
/// The object that received 'OnPointerEnter'.
/// </summary>
public GameObject pointerEnter { get; set; }
// The object that received OnPointerDown
private GameObject m_PointerPress;
/// <summary>
/// The raw GameObject for the last press event. This means that it is the 'pressed' GameObject even if it can not receive the press event itself.
/// </summary>
public GameObject lastPress { get; private set; }
/// <summary>
/// The object that the press happened on even if it can not handle the press event.
/// </summary>
public GameObject rawPointerPress { get; set; }
/// <summary>
/// The object that is receiving 'OnDrag'.
/// </summary>
public GameObject pointerDrag { get; set; }
/// <summary>
/// RaycastResult associated with the current event.
/// </summary>
public RaycastResult pointerCurrentRaycast { get; set; }
/// <summary>
/// RaycastResult associated with the pointer press.
/// </summary>
public RaycastResult pointerPressRaycast { get; set; }
public List<GameObject> hovered = new List<GameObject>();
/// <summary>
/// Is it possible to click this frame
/// </summary>
public bool eligibleForClick { get; set; }
/// <summary>
/// Id of the pointer (touch id).
/// </summary>
public int pointerId { get; set; }
/// <summary>
/// Current pointer position.
/// </summary>
public Vector2 position { get; set; }
/// <summary>
/// Pointer delta since last update.
/// </summary>
public Vector2 delta { get; set; }
/// <summary>
/// Position of the press.
/// </summary>
public Vector2 pressPosition { get; set; }
/// <summary>
/// World-space position where a ray cast into the screen hits something
/// </summary>
[Obsolete("Use either pointerCurrentRaycast.worldPosition or pointerPressRaycast.worldPosition")]
public Vector3 worldPosition { get; set; }
/// <summary>
/// World-space normal where a ray cast into the screen hits something
/// </summary>
[Obsolete("Use either pointerCurrentRaycast.worldNormal or pointerPressRaycast.worldNormal")]
public Vector3 worldNormal { get; set; }
/// <summary>
/// The last time a click event was sent. Used for double click
/// </summary>
public float clickTime { get; set; }
/// <summary>
/// Number of clicks in a row.
/// </summary>
/// <example>
/// <code>
/// using UnityEngine;
/// using System.Collections;
/// using UnityEngine.UI;
/// using UnityEngine.EventSystems;// Required when using Event data.
///
/// public class ExampleClass : MonoBehaviour, IPointerDownHandler
/// {
/// public void OnPointerDown(PointerEventData eventData)
/// {
/// //Grab the number of consecutive clicks and assign it to an integer varible.
/// int i = eventData.clickCount;
/// //Display the click count.
/// Debug.Log(i);
/// }
/// }
/// </code>
/// </example>
public int clickCount { get; set; }
/// <summary>
/// The amount of scroll since the last update.
/// </summary>
public Vector2 scrollDelta { get; set; }
/// <summary>
/// Should a drag threshold be used?
/// </summary>
/// <remarks>
/// If you do not want a drag threshold set this to false in IInitializePotentialDragHandler.OnInitializePotentialDrag.
/// </remarks>
public bool useDragThreshold { get; set; }
/// <summary>
/// Is a drag operation currently occuring.
/// </summary>
public bool dragging { get; set; }
/// <summary>
/// The EventSystems.PointerEventData.InputButton for this event.
/// </summary>
public InputButton button { get; set; }
public PointerEventData(EventSystem eventSystem) : base(eventSystem)
{
eligibleForClick = false;
pointerId = -1;
position = Vector2.zero; // Current position of the mouse or touch event
delta = Vector2.zero; // Delta since last update
pressPosition = Vector2.zero; // Delta since the event started being tracked
clickTime = 0.0f; // The last time a click event was sent out (used for double-clicks)
clickCount = 0; // Number of clicks in a row. 2 for a double-click for example.
scrollDelta = Vector2.zero;
useDragThreshold = true;
dragging = false;
button = InputButton.Left;
}
/// <summary>
/// Is the pointer moving.
/// </summary>
public bool IsPointerMoving()
{
return delta.sqrMagnitude > 0.0f;
}
/// <summary>
/// Is scroll being used on the input device.
/// </summary>
public bool IsScrolling()
{
return scrollDelta.sqrMagnitude > 0.0f;
}
/// <summary>
/// The camera associated with the last OnPointerEnter event.
/// </summary>
public Camera enterEventCamera
{
get { return pointerCurrentRaycast.module == null ? null : pointerCurrentRaycast.module.eventCamera; }
}
/// <summary>
/// The camera associated with the last OnPointerPress event.
/// </summary>
public Camera pressEventCamera
{
get { return pointerPressRaycast.module == null ? null : pointerPressRaycast.module.eventCamera; }
}
/// <summary>
/// The GameObject that received the OnPointerDown.
/// </summary>
public GameObject pointerPress
{
get { return m_PointerPress; }
set
{
if (m_PointerPress == value)
return;
lastPress = m_PointerPress;
m_PointerPress = value;
}
}
public override string ToString()
{
var sb = new StringBuilder();
sb.AppendLine("<b>Position</b>: " + position);
sb.AppendLine("<b>delta</b>: " + delta);
sb.AppendLine("<b>eligibleForClick</b>: " + eligibleForClick);
sb.AppendLine("<b>pointerEnter</b>: " + pointerEnter);
sb.AppendLine("<b>pointerPress</b>: " + pointerPress);
sb.AppendLine("<b>lastPointerPress</b>: " + lastPress);
sb.AppendLine("<b>pointerDrag</b>: " + pointerDrag);
sb.AppendLine("<b>Use Drag Threshold</b>: " + useDragThreshold);
sb.AppendLine("<b>Current Raycast:</b>");
sb.AppendLine(pointerCurrentRaycast.ToString());
sb.AppendLine("<b>Press Raycast:</b>");
sb.AppendLine(pointerPressRaycast.ToString());
return sb.ToString();
}
}
}
PointerEventDataUnityEngine.EventSystems