rabidus-test/Assets/CurvedUI/Scripts/CurvedUIPointerEventData.cs

33 lines
845 B
C#
Raw Permalink Normal View History

2023-08-15 17:38:54 +03:00
using System;
using System.Text;
using UnityEngine;
using UnityEngine.EventSystems;
namespace CurvedUI
{
/// <summary>
/// This class stores additional information that CurvedUI uses for its Pointer Events.
/// Right now its only used to store the controller used to interact with canvas.
/// </summary>
public class CurvedUIPointerEventData : PointerEventData
{
public CurvedUIPointerEventData(EventSystem eventSystem)
: base(eventSystem)
{
}
public enum ControllerType
{
NONE = -1,
VIVE = 0,
}
public GameObject Controller;
/// <summary>
/// Basically the position of user's finger on a touchpad. Goes from -1,-1 to 1,1
/// </summary>
public Vector2 TouchPadAxis = Vector2.zero;
}
}