Exemplo n.º 1
0
 protected void TrySetResult <T>(ReusablePromise <T> promise, AsyncTriggerPromiseDictionary <T> promises, T value)
 {
     if (promise != null)
     {
         promise.TrySetResult(value);
     }
     if (promises != null)
     {
         PromiseHelper.TrySetResultAll(promises.Values, value);
     }
 }
Exemplo n.º 2
0
 protected void TrySetResult <T>(ReusablePromise <T> promise, AsyncTriggerPromiseDictionary <T> promises, T value)
 {
     if (promise != null)
     {
         promise.TrySetResult(value);
     }
     if (promises != null)
     {
         foreach (var item in promises.Values)
         {
             item.TrySetResult(value);
         }
     }
 }
 /// <summary>OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse.</summary>
 public UniTask OnMouseDragAsync()
 {
     return(new UniTask(onMouseDrag ?? (onMouseDrag = new ReusablePromise())));
 }
 public UniTask <OnStateInfo> OnStateExitAsync()
 {
     return(new UniTask <OnStateInfo>(onStateExit ?? (onStateExit = new ReusablePromise <OnStateInfo>())));
 }
 /// <summary>OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider.</summary>
 public UniTask OnMouseDownAsync()
 {
     return(new UniTask(onMouseDown ?? (onMouseDown = new ReusablePromise())));
 }
Exemplo n.º 6
0
 public UniTask <BaseEventData> OnCancelAsync()
 {
     return(new UniTask <BaseEventData>(onCancel ?? (onCancel = new ReusablePromise <BaseEventData>())));
 }
 public UniTask <OnStateInfo> OnStateUpdateAsync()
 {
     return(new UniTask <OnStateInfo>(onStateUpdate ?? (onStateUpdate = new ReusablePromise <OnStateInfo>())));
 }
 /// <summary>OnMouseUp is called when the user has released the mouse button.</summary>
 public UniTask OnMouseUpAsync()
 {
     return(new UniTask(onMouseUp ?? (onMouseUp = new ReusablePromise())));
 }
Exemplo n.º 9
0
 public UniTask <PointerEventData> OnPointerDownAsync()
 {
     return(new UniTask <PointerEventData>(onPointerDown ?? (onPointerDown = new ReusablePromise <PointerEventData>())));
 }
 /// <summary>OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider.</summary>
 public UniTask <Collision> OnCollisionStayAsync()
 {
     return(new UniTask <Collision>(onCollisionStay ?? (onCollisionStay = new ReusablePromise <Collision>())));
 }
 public UniTask <PointerEventData> OnInitializePotentialDragAsync()
 {
     return(new UniTask <PointerEventData>(onInitializePotentialDrag ?? (onInitializePotentialDrag = new ReusablePromise <PointerEventData>())));
 }
 /// <summary>OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.</summary>
 public UniTask <Collision> OnCollisionEnterAsync()
 {
     return(new UniTask <Collision>(onCollisionEnter ?? (onCollisionEnter = new ReusablePromise <Collision>())));
 }
 /// <summary>OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.</summary>
 public UniTask <Collision> OnCollisionExitAsync()
 {
     return(new UniTask <Collision>(onCollisionExit ?? (onCollisionExit = new ReusablePromise <Collision>())));
 }
Exemplo n.º 14
0
 /// <summary>Sent each frame where another object is within a trigger collider attached to this object (2D physics only).</summary>
 public UniTask <Collider2D> OnTriggerStay2DAsync()
 {
     return(new UniTask <Collider2D>(onTriggerStay2D ?? (onTriggerStay2D = new ReusablePromise <Collider2D>())));
 }
 public UniTask <BaseEventData> OnDeselectAsync()
 {
     return(new UniTask <BaseEventData>(onDeselect ?? (onDeselect = new ReusablePromise <BaseEventData>())));
 }
Exemplo n.º 16
0
 /// <summary>OnBecameVisible is called when the renderer became visible by any camera.</summary>
 public UniTask OnBecameVisibleAsync()
 {
     return(new UniTask(onBecameVisible ?? (onBecameVisible = new ReusablePromise())));
 }
 /// <summary>OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider.</summary>
 public UniTask OnMouseExitAsync()
 {
     return(new UniTask(onMouseExit ?? (onMouseExit = new ReusablePromise())));
 }
 /// <summary>Callback that is sent if an associated RectTransform has it's dimensions changed.</summary>
 public UniTask OnRectTransformDimensionsChangeAsync()
 {
     return(new UniTask(onRectTransformDimensionsChange ?? (onRectTransformDimensionsChange = new ReusablePromise())));
 }
 /// <summary>OnMouseOver is called every frame while the mouse is over the GUIElement or Collider.</summary>
 public UniTask OnMouseOverAsync()
 {
     return(new UniTask(onMouseOver ?? (onMouseOver = new ReusablePromise())));
 }
 /// <summary>Callback that is sent if an associated RectTransform is removed.</summary>
 public UniTask OnRectTransformRemovedAsync()
 {
     return(new UniTask(onRectTransformRemoved ?? (onRectTransformRemoved = new ReusablePromise())));
 }
Exemplo n.º 21
0
 public UniTask <BaseEventData> OnSubmitAsync()
 {
     return(new UniTask <BaseEventData>(onSubmit ?? (onSubmit = new ReusablePromise <BaseEventData>())));
 }
 /// <summary>This function is called every fixed framerate frame, if the MonoBehaviour is enabled.</summary>
 public UniTask FixedUpdateAsync()
 {
     return(new UniTask(fixedUpdate ?? (fixedUpdate = new ReusablePromise())));
 }
Exemplo n.º 23
0
 public UniTask <BaseEventData> OnUpdateSelectedAsync()
 {
     return(new UniTask <BaseEventData>(onUpdateSelected ?? (onUpdateSelected = new ReusablePromise <BaseEventData>())));
 }
Exemplo n.º 24
0
 /// <summary>This function is called when the behaviour becomes disabled () or inactive.</summary>
 public UniTask OnDisableAsync()
 {
     return(new UniTask(onDisable ?? (onDisable = new ReusablePromise())));
 }
Exemplo n.º 25
0
 public UniTask <PointerEventData> OnDropAsync()
 {
     return(new UniTask <PointerEventData>(onDrop ?? (onDrop = new ReusablePromise <PointerEventData>())));
 }
 public UniTask <OnStateInfo> OnStateEnterAsync()
 {
     return(new UniTask <OnStateInfo>(onStateEnter ?? (onStateEnter = new ReusablePromise <OnStateInfo>())));
 }
Exemplo n.º 27
0
 public UniTask <AxisEventData> OnMoveAsync()
 {
     return(new UniTask <AxisEventData>(onMove ?? (onMove = new ReusablePromise <AxisEventData>())));
 }
Exemplo n.º 28
0
 public UniTask <float> OnJointBreakAsync()
 {
     return(new UniTask <float>(onJointBreak ?? (onJointBreak = new ReusablePromise <float>())));
 }
 /// <summary>Callback that is sent if the canvas group is changed.</summary>
 public UniTask OnCanvasGroupChangedAsync()
 {
     return(new UniTask(onCanvasGroupChanged ?? (onCanvasGroupChanged = new ReusablePromise())));
 }
Exemplo n.º 30
0
 /// <summary>Update is called every frame, if the MonoBehaviour is enabled.</summary>
 public UniTask UpdateAsync()
 {
     return(new UniTask(promise ?? (promise = new ReusablePromise())));
 }