C# 클래스 UISlider, Hero.Coli

상속: AutoSpriteControlBase
파일 보기 프로젝트 열기: CyberCRI/Hero.Coli 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
current UISlider,
direction Direction,
eventReceiver GameObject
foreground Transform
functionName string
numberOfSteps int
onValueChange OnValueChange
thumb Transform

공개 메소드들

메소드 설명
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.

메소드 상세

Awake() 공개 메소드

Ensure that we have a background and a foreground object to work with.
public Awake ( ) : void
리턴 void

ForceUpdate() 공개 메소드

Force-update the slider. Useful if you've changed the properties and want it to update visually.
public ForceUpdate ( ) : void
리턴 void

Init() 공개 메소드

Initialize the cached values.
public Init ( ) : void
리턴 void

OnDrag() 공개 메소드

When dragged, figure out where the mouse is and calculate the updated value of the slider.
public OnDrag ( Vector2 delta ) : void
delta Vector2
리턴 void

OnDragThumb() 공개 메소드

Callback from the thumb.
public OnDragThumb ( GameObject go, Vector2 delta ) : void
go GameObject
delta Vector2
리턴 void

OnKey() 공개 메소드

Watch for key events and adjust the value accordingly.
public OnKey ( KeyCode, key ) : void
key KeyCode,
리턴 void

OnPress() 공개 메소드

Update the slider's position on press.
public OnPress ( bool pressed ) : void
pressed bool
리턴 void

OnPressThumb() 공개 메소드

Callback from the thumb.
public OnPressThumb ( GameObject go, bool pressed ) : void
go GameObject
pressed bool
리턴 void

Set() 공개 메소드

Update the visible slider.
public Set ( float input, bool force ) : void
input float
force bool
리턴 void

Start() 공개 메소드

We want to receive drag events from the thumb.
public Start ( ) : void
리턴 void

UpdateDrag() 공개 메소드

Update the slider's position based on the mouse.
public UpdateDrag ( ) : void
리턴 void

프로퍼티 상세

current 정적으로 공개적으로 프로퍼티

Current slider. This value is set prior to the callback function being triggered.
static public UISlider, current
리턴 UISlider,

direction 공개적으로 프로퍼티

Direction the slider will expand in.
public Direction, direction
리턴 Direction,

eventReceiver 공개적으로 프로퍼티

Event receiver that will be notified of the value changes.
public GameObject eventReceiver
리턴 GameObject

foreground 공개적으로 프로퍼티

Object used for the foreground.
public Transform foreground
리턴 Transform

functionName 공개적으로 프로퍼티

Function on the event receiver that will receive the value changes.
public string functionName
리턴 string

numberOfSteps 공개적으로 프로퍼티

Number of steps the slider should be divided into. For example 5 means possible values of 0, 0.25, 0.5, 0.75, and 1.0.
public int numberOfSteps
리턴 int

onValueChange 공개적으로 프로퍼티

Allow for delegate-based subscriptions for faster events than 'eventReceiver', and allowing for multiple receivers.
public OnValueChange onValueChange
리턴 OnValueChange

thumb 공개적으로 프로퍼티

Object that acts as a thumb.
public Transform thumb
리턴 Transform