C# 클래스 UIScreen, Unity-UI-Framework

UIScreen contains dictionaries which keeps references to all Text, Slider, Image.
상속: MonoBehaviour
파일 보기 프로젝트 열기: psuong/Unity-UI-Framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
imageDict Image>.Dictionary
sliderDict Slider>.Dictionary
textDict Text>.Dictionary

공개 메소드들

메소드 설명
CloseThisScreen ( ) : void

Deactivates the instance of a gameObject that UI_Screen is attached to.

GetImage ( string imageName ) : Image

Returns an instance of an image.

GetSlider ( string sliderName ) : Slider,

Returns an instance of a slider.

GetText ( string textName ) : Text

Returns an instance of a Text gameObject.

OpenThisScreen ( ) : void

Activates the instance of a gameObject that UI_Screen is attached to.

SetImageColor ( string imageName, Color setColor ) : void

Takes in a Unity's Color component and sets the Image Component to that that color.

SetImageColor ( string imageName, float r, float g, float b, float a = 1 ) : void

Takes in Unity's Color RGBA values as a float between 0 and 1 and sets the ImageComponent to that color.

SetImageFill ( string imageName, float fillValue ) : void
SetSliderFill ( string sliderName, float sliderValue ) : void

Sets the slider's fill value to the desired amount.

SetSliderFill ( string sliderName, int sliderValue ) : void

Overloads the SetSliderFill method to take in whole numbers (integers) and set the value of the slider to that value.

SetText ( string textName, string screenText ) : void

Sets the text variable in the Text gameObject to a custom string.

SetUp ( ) : void

Populates the dictionaries with references to all Text, Image, and Slider components within the scene.

TextProgression ( string textName, string rollingText, KeyCode, interruptKey ) : System.Collections.IEnumerator

Sets text to progress one letter at a time

보호된 메소드들

메소드 설명
Start ( ) : void

Unity's Start() method; this checks to see if the dictionaries are built up, if not then it builds up the dictionaries.

비공개 메소드들

메소드 설명
SetUpImageDict ( Image imageList ) : void

Builds the imageDict with keys as a unique Image Component's name and value as the associated Image's object.

SetUpSliderDict ( Slider, sliderList ) : void

Builds the sliderDict with keys as a unique Slider Component's name and value as the associated Slider's object.

SetUpTextDict ( Text textList ) : void

Builds the textDict with keys as a unique Text Component's name and the value as the associated Text's object.

메소드 상세

CloseThisScreen() 공개 메소드

Deactivates the instance of a gameObject that UI_Screen is attached to.
public CloseThisScreen ( ) : void
리턴 void

GetImage() 공개 메소드

Returns an instance of an image.
public GetImage ( string imageName ) : Image
imageName string Name of the image gameObject
리턴 Image

GetSlider() 공개 메소드

Returns an instance of a slider.
public GetSlider ( string sliderName ) : Slider,
sliderName string Name of the slider gameObject
리턴 Slider,

GetText() 공개 메소드

Returns an instance of a Text gameObject.
public GetText ( string textName ) : Text
textName string Name of the text gameObject.
리턴 Text

OpenThisScreen() 공개 메소드

Activates the instance of a gameObject that UI_Screen is attached to.
public OpenThisScreen ( ) : void
리턴 void

SetImageColor() 공개 메소드

Takes in a Unity's Color component and sets the Image Component to that that color.
public SetImageColor ( string imageName, Color setColor ) : void
imageName string Name of the Image Component
setColor Color Color value
리턴 void

SetImageColor() 공개 메소드

Takes in Unity's Color RGBA values as a float between 0 and 1 and sets the ImageComponent to that color.
public SetImageColor ( string imageName, float r, float g, float b, float a = 1 ) : void
imageName string Name of the Image Component
r float Float value between 0 and 1 for the red component
g float Float value between 0 and 1 for the green component
b float Float value between 0 and 1 for the blue component
a float Float value between 0 and 1 for the alpha component
리턴 void

SetImageFill() 공개 메소드

public SetImageFill ( string imageName, float fillValue ) : void
imageName string
fillValue float
리턴 void

SetSliderFill() 공개 메소드

Sets the slider's fill value to the desired amount.
public SetSliderFill ( string sliderName, float sliderValue ) : void
sliderName string Name of the slider component
sliderValue float Float value between the min and the max values.
리턴 void

SetSliderFill() 공개 메소드

Overloads the SetSliderFill method to take in whole numbers (integers) and set the value of the slider to that value.
public SetSliderFill ( string sliderName, int sliderValue ) : void
sliderName string Name of the slider component (string)
sliderValue int Integer value of the slider's value between the min and max values.
리턴 void

SetText() 공개 메소드

Sets the text variable in the Text gameObject to a custom string.
public SetText ( string textName, string screenText ) : void
textName string Name of the Text Component
screenText string The string to display
리턴 void

SetUp() 공개 메소드

Populates the dictionaries with references to all Text, Image, and Slider components within the scene.
public SetUp ( ) : void
리턴 void

Start() 보호된 메소드

Unity's Start() method; this checks to see if the dictionaries are built up, if not then it builds up the dictionaries.
protected Start ( ) : void
리턴 void

TextProgression() 공개 메소드

Sets text to progress one letter at a time
public TextProgression ( string textName, string rollingText, KeyCode, interruptKey ) : System.Collections.IEnumerator
textName string Name of the Text Component
rollingText string The text to be displayed progressively
interruptKey KeyCode, Set key to interrupt the coroutine and display the entire text
리턴 System.Collections.IEnumerator

프로퍼티 상세

imageDict 보호되어 있는 프로퍼티

protected Dictionary imageDict
리턴 Image>.Dictionary

sliderDict 보호되어 있는 프로퍼티

protected Dictionary sliderDict
리턴 Slider>.Dictionary

textDict 보호되어 있는 프로퍼티

protected Dictionary textDict
리턴 Text>.Dictionary