Implements EventSystem interfaces.

pull/32/head
TORISOUP 2019-08-13 23:33:00 +09:00
parent 10ba7bcfde
commit 08913104a9
17 changed files with 34 additions and 34 deletions

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncBeginDragTrigger : AsyncTriggerBase public class AsyncBeginDragTrigger : AsyncTriggerBase, IBeginDragHandler
{ {
AsyncTriggerPromise<PointerEventData> onBeginDrag; AsyncTriggerPromise<PointerEventData> onBeginDrag;
AsyncTriggerPromiseDictionary<PointerEventData> onBeginDrags; AsyncTriggerPromiseDictionary<PointerEventData> onBeginDrags;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnBeginDrag(PointerEventData eventData) void IBeginDragHandler.OnBeginDrag(PointerEventData eventData)
{ {
TrySetResult(onBeginDrag, onBeginDrags, eventData); TrySetResult(onBeginDrag, onBeginDrags, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncCancelTrigger : AsyncTriggerBase public class AsyncCancelTrigger : AsyncTriggerBase, ICancelHandler
{ {
AsyncTriggerPromise<BaseEventData> onCancel; AsyncTriggerPromise<BaseEventData> onCancel;
AsyncTriggerPromiseDictionary<BaseEventData> onCancels; AsyncTriggerPromiseDictionary<BaseEventData> onCancels;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnCancel(BaseEventData eventData) void ICancelHandler.OnCancel(BaseEventData eventData)
{ {
TrySetResult(onCancel, onCancels, eventData); TrySetResult(onCancel, onCancels, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncDeselectTrigger : AsyncTriggerBase public class AsyncDeselectTrigger : AsyncTriggerBase, IDeselectHandler
{ {
AsyncTriggerPromise<BaseEventData> onDeselect; AsyncTriggerPromise<BaseEventData> onDeselect;
AsyncTriggerPromiseDictionary<BaseEventData> onDeselects; AsyncTriggerPromiseDictionary<BaseEventData> onDeselects;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnDeselect(BaseEventData eventData) void IDeselectHandler.OnDeselect(BaseEventData eventData)
{ {
TrySetResult(onDeselect, onDeselects, eventData); TrySetResult(onDeselect, onDeselects, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncDragTrigger : AsyncTriggerBase public class AsyncDragTrigger : AsyncTriggerBase, IDragHandler
{ {
AsyncTriggerPromise<PointerEventData> onDrag; AsyncTriggerPromise<PointerEventData> onDrag;
AsyncTriggerPromiseDictionary<PointerEventData> onDrags; AsyncTriggerPromiseDictionary<PointerEventData> onDrags;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnDrag(PointerEventData eventData) void IDragHandler.OnDrag(PointerEventData eventData)
{ {
TrySetResult(onDrag, onDrags, eventData); TrySetResult(onDrag, onDrags, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncDropTrigger : AsyncTriggerBase public class AsyncDropTrigger : AsyncTriggerBase, IDropHandler
{ {
AsyncTriggerPromise<PointerEventData> onDrop; AsyncTriggerPromise<PointerEventData> onDrop;
AsyncTriggerPromiseDictionary<PointerEventData> onDrops; AsyncTriggerPromiseDictionary<PointerEventData> onDrops;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnDrop(PointerEventData eventData) void IDropHandler.OnDrop(PointerEventData eventData)
{ {
TrySetResult(onDrop, onDrops, eventData); TrySetResult(onDrop, onDrops, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncEndDragTrigger : AsyncTriggerBase public class AsyncEndDragTrigger : AsyncTriggerBase, IEndDragHandler
{ {
AsyncTriggerPromise<PointerEventData> onEndDrag; AsyncTriggerPromise<PointerEventData> onEndDrag;
AsyncTriggerPromiseDictionary<PointerEventData> onEndDrags; AsyncTriggerPromiseDictionary<PointerEventData> onEndDrags;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnEndDrag(PointerEventData eventData) void IEndDragHandler.OnEndDrag(PointerEventData eventData)
{ {
TrySetResult(onEndDrag, onEndDrags, eventData); TrySetResult(onEndDrag, onEndDrags, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncInitializePotentialDragTrigger : AsyncTriggerBase public class AsyncInitializePotentialDragTrigger : AsyncTriggerBase, IInitializePotentialDragHandler
{ {
AsyncTriggerPromise<PointerEventData> onInitializePotentialDrag; AsyncTriggerPromise<PointerEventData> onInitializePotentialDrag;
AsyncTriggerPromiseDictionary<PointerEventData> onInitializePotentialDrags; AsyncTriggerPromiseDictionary<PointerEventData> onInitializePotentialDrags;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnInitializePotentialDrag(PointerEventData eventData) void IInitializePotentialDragHandler.OnInitializePotentialDrag(PointerEventData eventData)
{ {
TrySetResult(onInitializePotentialDrag, onInitializePotentialDrags, eventData); TrySetResult(onInitializePotentialDrag, onInitializePotentialDrags, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncMoveTrigger : AsyncTriggerBase public class AsyncMoveTrigger : AsyncTriggerBase, IMoveHandler
{ {
AsyncTriggerPromise<AxisEventData> onMove; AsyncTriggerPromise<AxisEventData> onMove;
AsyncTriggerPromiseDictionary<AxisEventData> onMoves; AsyncTriggerPromiseDictionary<AxisEventData> onMoves;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnMove(AxisEventData eventData) void IMoveHandler.OnMove(AxisEventData eventData)
{ {
TrySetResult(onMove, onMoves, eventData); TrySetResult(onMove, onMoves, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncPointerClickTrigger : AsyncTriggerBase public class AsyncPointerClickTrigger : AsyncTriggerBase, IPointerClickHandler
{ {
AsyncTriggerPromise<PointerEventData> onPointerClick; AsyncTriggerPromise<PointerEventData> onPointerClick;
AsyncTriggerPromiseDictionary<PointerEventData> onPointerClicks; AsyncTriggerPromiseDictionary<PointerEventData> onPointerClicks;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnPointerClick(PointerEventData eventData) void IPointerClickHandler.OnPointerClick(PointerEventData eventData)
{ {
TrySetResult(onPointerClick, onPointerClicks, eventData); TrySetResult(onPointerClick, onPointerClicks, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncPointerDownTrigger : AsyncTriggerBase public class AsyncPointerDownTrigger : AsyncTriggerBase, IPointerDownHandler
{ {
AsyncTriggerPromise<PointerEventData> onPointerDown; AsyncTriggerPromise<PointerEventData> onPointerDown;
AsyncTriggerPromiseDictionary<PointerEventData> onPointerDowns; AsyncTriggerPromiseDictionary<PointerEventData> onPointerDowns;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnPointerDown(PointerEventData eventData) void IPointerDownHandler.OnPointerDown(PointerEventData eventData)
{ {
TrySetResult(onPointerDown, onPointerDowns, eventData); TrySetResult(onPointerDown, onPointerDowns, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncPointerEnterTrigger : AsyncTriggerBase public class AsyncPointerEnterTrigger : AsyncTriggerBase, IPointerEnterHandler
{ {
AsyncTriggerPromise<PointerEventData> onPointerEnter; AsyncTriggerPromise<PointerEventData> onPointerEnter;
AsyncTriggerPromiseDictionary<PointerEventData> onPointerEnters; AsyncTriggerPromiseDictionary<PointerEventData> onPointerEnters;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnPointerEnter(PointerEventData eventData) void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData)
{ {
TrySetResult(onPointerEnter, onPointerEnters, eventData); TrySetResult(onPointerEnter, onPointerEnters, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncPointerExitTrigger : AsyncTriggerBase public class AsyncPointerExitTrigger : AsyncTriggerBase, IPointerExitHandler
{ {
AsyncTriggerPromise<PointerEventData> onPointerExit; AsyncTriggerPromise<PointerEventData> onPointerExit;
AsyncTriggerPromiseDictionary<PointerEventData> onPointerExits; AsyncTriggerPromiseDictionary<PointerEventData> onPointerExits;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnPointerExit(PointerEventData eventData) void IPointerExitHandler.OnPointerExit(PointerEventData eventData)
{ {
TrySetResult(onPointerExit, onPointerExits, eventData); TrySetResult(onPointerExit, onPointerExits, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncPointerUpTrigger : AsyncTriggerBase public class AsyncPointerUpTrigger : AsyncTriggerBase, IPointerUpHandler
{ {
AsyncTriggerPromise<PointerEventData> onPointerUp; AsyncTriggerPromise<PointerEventData> onPointerUp;
AsyncTriggerPromiseDictionary<PointerEventData> onPointerUps; AsyncTriggerPromiseDictionary<PointerEventData> onPointerUps;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnPointerUp(PointerEventData eventData) void IPointerUpHandler.OnPointerUp(PointerEventData eventData)
{ {
TrySetResult(onPointerUp, onPointerUps, eventData); TrySetResult(onPointerUp, onPointerUps, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncScrollTrigger : AsyncTriggerBase public class AsyncScrollTrigger : AsyncTriggerBase, IScrollHandler
{ {
AsyncTriggerPromise<PointerEventData> onScroll; AsyncTriggerPromise<PointerEventData> onScroll;
AsyncTriggerPromiseDictionary<PointerEventData> onScrolls; AsyncTriggerPromiseDictionary<PointerEventData> onScrolls;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnScroll(PointerEventData eventData) void IScrollHandler.OnScroll(PointerEventData eventData)
{ {
TrySetResult(onScroll, onScrolls, eventData); TrySetResult(onScroll, onScrolls, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncSelectTrigger : AsyncTriggerBase public class AsyncSelectTrigger : AsyncTriggerBase, ISelectHandler
{ {
AsyncTriggerPromise<BaseEventData> onSelect; AsyncTriggerPromise<BaseEventData> onSelect;
AsyncTriggerPromiseDictionary<BaseEventData> onSelects; AsyncTriggerPromiseDictionary<BaseEventData> onSelects;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnSelect(BaseEventData eventData) void ISelectHandler.OnSelect(BaseEventData eventData)
{ {
TrySetResult(onSelect, onSelects, eventData); TrySetResult(onSelect, onSelects, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncSubmitTrigger : AsyncTriggerBase public class AsyncSubmitTrigger : AsyncTriggerBase, ISubmitHandler
{ {
AsyncTriggerPromise<BaseEventData> onSubmit; AsyncTriggerPromise<BaseEventData> onSubmit;
AsyncTriggerPromiseDictionary<BaseEventData> onSubmits; AsyncTriggerPromiseDictionary<BaseEventData> onSubmits;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnSubmit(BaseEventData eventData) void ISubmitHandler.OnSubmit(BaseEventData eventData)
{ {
TrySetResult(onSubmit, onSubmits, eventData); TrySetResult(onSubmit, onSubmits, eventData);
} }

View File

@ -10,7 +10,7 @@ using UnityEngine.EventSystems;
namespace UniRx.Async.Triggers namespace UniRx.Async.Triggers
{ {
[DisallowMultipleComponent] [DisallowMultipleComponent]
public class AsyncUpdateSelectedTrigger : AsyncTriggerBase public class AsyncUpdateSelectedTrigger : AsyncTriggerBase, IUpdateSelectedHandler
{ {
AsyncTriggerPromise<BaseEventData> onUpdateSelected; AsyncTriggerPromise<BaseEventData> onUpdateSelected;
AsyncTriggerPromiseDictionary<BaseEventData> onUpdateSelecteds; AsyncTriggerPromiseDictionary<BaseEventData> onUpdateSelecteds;
@ -22,7 +22,7 @@ namespace UniRx.Async.Triggers
} }
void OnUpdateSelected(BaseEventData eventData) void IUpdateSelectedHandler.OnUpdateSelected(BaseEventData eventData)
{ {
TrySetResult(onUpdateSelected, onUpdateSelecteds, eventData); TrySetResult(onUpdateSelected, onUpdateSelecteds, eventData);
} }