Свойство | Type | Description | |
---|---|---|---|
current | UISlider, | ||
direction | Direction, | ||
eventReceiver | GameObject | ||
foreground | Transform | ||
functionName | string | ||
numberOfSteps | int | ||
onValueChange | OnValueChange | ||
thumb | Transform |
Méthode | Description | |
---|---|---|
Awake ( ) : void |
Ensure that we have a background and a foreground object to work with.
|
|
ForceUpdate ( ) : void |
Force-update the slider. Useful if you've changed the properties and want it to update visually.
|
|
Init ( ) : void |
Initialize the cached values.
|
|
OnDrag ( Vector2 delta ) : void |
When dragged, figure out where the mouse is and calculate the updated value of the slider.
|
|
OnDragThumb ( GameObject go, Vector2 delta ) : void |
Callback from the thumb.
|
|
OnKey ( KeyCode, key ) : void |
Watch for key events and adjust the value accordingly.
|
|
OnPress ( bool pressed ) : void |
Update the slider's position on press.
|
|
OnPressThumb ( GameObject go, bool pressed ) : void |
Callback from the thumb.
|
|
Set ( float input, bool force ) : void |
Update the visible slider.
|
|
Start ( ) : void |
We want to receive drag events from the thumb.
|
|
UpdateDrag ( ) : void |
Update the slider's position based on the mouse.
|
public OnDragThumb ( GameObject go, Vector2 delta ) : void | ||
go | GameObject | |
delta | Vector2 | |
Résultat | void |
public OnPressThumb ( GameObject go, bool pressed ) : void | ||
go | GameObject | |
pressed | bool | |
Résultat | void |
public Set ( float input, bool force ) : void | ||
input | float | |
force | bool | |
Résultat | void |