//========= Copyright 2016-2018, HTC Corporation. All rights reserved. =========== using UnityEngine.EventSystems; namespace HTC.UnityPlugin.ColliderEvent { public static class ExecuteColliderEvents { public static readonly ExecuteEvents.EventFunction HoverEnterHandler = Execute; private static void Execute(IColliderEventHoverEnterHandler handler, BaseEventData eventData) { handler.OnColliderEventHoverEnter(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction HoverExitHandler = Execute; private static void Execute(IColliderEventHoverExitHandler handler, BaseEventData eventData) { handler.OnColliderEventHoverExit(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction PressDownHandler = Execute; private static void Execute(IColliderEventPressDownHandler handler, BaseEventData eventData) { handler.OnColliderEventPressDown(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction PressUpHandler = Execute; private static void Execute(IColliderEventPressUpHandler handler, BaseEventData eventData) { handler.OnColliderEventPressUp(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction PressEnterHandler = Execute; private static void Execute(IColliderEventPressEnterHandler handler, BaseEventData eventData) { handler.OnColliderEventPressEnter(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction PressExitHandler = Execute; private static void Execute(IColliderEventPressExitHandler handler, BaseEventData eventData) { handler.OnColliderEventPressExit(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction ClickHandler = Execute; private static void Execute(IColliderEventClickHandler handler, BaseEventData eventData) { handler.OnColliderEventClick(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction DragStartHandler = Execute; private static void Execute(IColliderEventDragStartHandler handler, BaseEventData eventData) { handler.OnColliderEventDragStart(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction DragFixedUpdateHandler = Execute; private static void Execute(IColliderEventDragFixedUpdateHandler handler, BaseEventData eventData) { handler.OnColliderEventDragFixedUpdate(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction DragUpdateHandler = Execute; private static void Execute(IColliderEventDragUpdateHandler handler, BaseEventData eventData) { handler.OnColliderEventDragUpdate(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction DragEndHandler = Execute; private static void Execute(IColliderEventDragEndHandler handler, BaseEventData eventData) { handler.OnColliderEventDragEnd(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction DropHandler = Execute; private static void Execute(IColliderEventDropHandler handler, BaseEventData eventData) { handler.OnColliderEventDrop(ExecuteEvents.ValidateEventData(eventData)); } public static readonly ExecuteEvents.EventFunction AxisChangedHandler = Execute; private static void Execute(IColliderEventAxisChangedHandler handler, BaseEventData eventData) { handler.OnColliderEventAxisChanged(ExecuteEvents.ValidateEventData(eventData)); } } }