C# Class Fungus.Draggable2D

Detects drag and drop interactions on a Game Object, and sends events to all Flowchart event handlers in the scene. The Game Object must have Collider2D & RigidBody components attached. The Collider2D must have the Is Trigger property set to true. The RigidBody would typically have the Is Kinematic property set to true, unless you want the object to move around using physics. Use in conjunction with the Drag Started, Drag Completed, Drag Cancelled, Drag Entered & Drag Exited event handlers.
Inheritance: UnityEngine.MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerEnterHandler, IPointerExitHandler
Afficher le fichier Open project: snozbot/fungus Class Usage Examples

Protected Properties

Свойство Type Description
delta UnityEngine.Vector3
dragCompletedHandlers List
newPosition UnityEngine.Vector3
startingPosition UnityEngine.Vector3
updatePosition bool

Méthodes publiques

Méthode Description
OnBeginDrag ( PointerEventData eventData ) : void
OnDrag ( PointerEventData eventData ) : void
OnEndDrag ( PointerEventData eventData ) : void
OnPointerEnter ( PointerEventData eventData ) : void
OnPointerExit ( PointerEventData eventData ) : void
RegisterHandler ( DragCompleted handler ) : void
UnregisterHandler ( DragCompleted handler ) : void

Méthodes protégées

Méthode Description
ChangeCursor ( Texture2D cursorTexture ) : void
DoBeginDrag ( ) : void
DoDrag ( ) : void
DoEndDrag ( ) : void
DoPointerEnter ( ) : void
DoPointerExit ( ) : void
LateUpdate ( ) : void
OnMouseDown ( ) : void
OnMouseDrag ( ) : void
OnMouseEnter ( ) : void
OnMouseExit ( ) : void
OnMouseUp ( ) : void
OnTriggerEnter2D ( Collider2D other ) : void
OnTriggerExit2D ( Collider2D other ) : void

Method Details

ChangeCursor() protected méthode

protected ChangeCursor ( Texture2D cursorTexture ) : void
cursorTexture UnityEngine.Texture2D
Résultat void

DoBeginDrag() protected méthode

protected DoBeginDrag ( ) : void
Résultat void

DoDrag() protected méthode

protected DoDrag ( ) : void
Résultat void

DoEndDrag() protected méthode

protected DoEndDrag ( ) : void
Résultat void

DoPointerEnter() protected méthode

protected DoPointerEnter ( ) : void
Résultat void

DoPointerExit() protected méthode

protected DoPointerExit ( ) : void
Résultat void

LateUpdate() protected méthode

protected LateUpdate ( ) : void
Résultat void

OnBeginDrag() public méthode

public OnBeginDrag ( PointerEventData eventData ) : void
eventData UnityEngine.EventSystems.PointerEventData
Résultat void

OnDrag() public méthode

public OnDrag ( PointerEventData eventData ) : void
eventData UnityEngine.EventSystems.PointerEventData
Résultat void

OnEndDrag() public méthode

public OnEndDrag ( PointerEventData eventData ) : void
eventData UnityEngine.EventSystems.PointerEventData
Résultat void

OnMouseDown() protected méthode

protected OnMouseDown ( ) : void
Résultat void

OnMouseDrag() protected méthode

protected OnMouseDrag ( ) : void
Résultat void

OnMouseEnter() protected méthode

protected OnMouseEnter ( ) : void
Résultat void

OnMouseExit() protected méthode

protected OnMouseExit ( ) : void
Résultat void

OnMouseUp() protected méthode

protected OnMouseUp ( ) : void
Résultat void

OnPointerEnter() public méthode

public OnPointerEnter ( PointerEventData eventData ) : void
eventData UnityEngine.EventSystems.PointerEventData
Résultat void

OnPointerExit() public méthode

public OnPointerExit ( PointerEventData eventData ) : void
eventData UnityEngine.EventSystems.PointerEventData
Résultat void

OnTriggerEnter2D() protected méthode

protected OnTriggerEnter2D ( Collider2D other ) : void
other UnityEngine.Collider2D
Résultat void

OnTriggerExit2D() protected méthode

protected OnTriggerExit2D ( Collider2D other ) : void
other UnityEngine.Collider2D
Résultat void

RegisterHandler() public méthode

public RegisterHandler ( DragCompleted handler ) : void
handler DragCompleted
Résultat void

UnregisterHandler() public méthode

public UnregisterHandler ( DragCompleted handler ) : void
handler DragCompleted
Résultat void

Property Details

delta protected_oe property

protected Vector3,UnityEngine delta
Résultat UnityEngine.Vector3

dragCompletedHandlers protected_oe property

protected List dragCompletedHandlers
Résultat List

newPosition protected_oe property

protected Vector3,UnityEngine newPosition
Résultat UnityEngine.Vector3

startingPosition protected_oe property

protected Vector3,UnityEngine startingPosition
Résultat UnityEngine.Vector3

updatePosition protected_oe property

protected bool updatePosition
Résultat bool