메소드 | 설명 | |
---|---|---|
OnMouseDown ( ) : void |
Implemented from the Draggable interface. If the object has a Collider, a touch or a click will drag the object. This method is called when the object is picked up by the mouse or finger. Here, we tell the associated MenuButton this UIDraggableElement was taken.
|
|
OnMouseDrag ( ) : void |
Implemented from the Draggable interface. If the object has a Collider, a touch or a click will drag the object. Here, we make the UIDraggableElement follow the mouse's cursor.
|
|
OnMouseDrop ( ) : void |
Implemented from the Draggable interface. If the object has a Collider, a touch or a click will drag the object. This method is called when the object is dropped by the mouse or finger. Here, we spawn the Element associated with this UIDraggableElement at the right position and destroy this object.
|
|
OnMouseUp ( ) : void |
Implemented from the Draggable interface. If the object has a Collider, a touch or a click will drag the object. This method is called when the object is dropped by the mouse or finger. Here, we move the UIDraggableElement to its last position.
|
메소드 | 설명 | |
---|---|---|
GetAssociatedMenuButtonName ( ) : string |
Informs which button is associated with this UIDraggableElement.
|
|
GetElementBase ( ) : DraggableElement, |
Informs which Element this UIDraggableElement has to spawn.
|
메소드 | 설명 | |
---|---|---|
CalculDemiLePlusProche ( float value ) : float |
Calculates the nearest n.5 float.
|
|
Resize ( GameObject canvas ) : void |
Resizes the UIDraggableElement so it matches the size of the correponding MenuButton.
|
|
Start ( ) : void |
Initializes the UIDraggableElement.
|
|
UndoMoveUIDraggableElement ( ) : void |
Returns the UIDraggableElement to its original place.
|
protected abstract GetAssociatedMenuButtonName ( ) : string | ||
리턴 | string |
protected abstract GetElementBase ( ) : DraggableElement, | ||
리턴 | DraggableElement, |