C# 클래스 tk2dTextMesh, Malisse

상속: MonoBehaviour
파일 보기 프로젝트 열기: Collegiennes/Malisse 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
lineSpacing float
pixelPerfect bool
spacing float

Private Properties

프로퍼티 타입 설명
FillTextData int
GetXAnchorForWidth float
GetYAnchorForHeight float

공개 메소드들

메소드 설명
Awake ( ) : void
Commit ( ) : void

Call commit after changing properties to commit the changes. This is deffered to a commit call as more than one operation may require rebuilding the buffers, eg. scaling and changing text. This will be wasteful if performed multiple times.

ForceBuild ( ) : void
FormatText ( ) : void
GetMeshDimensionsForString ( string str ) : Vector2

Calculates the mesh dimensions for the given string and returns a width and height.

Init ( ) : void
Init ( bool force ) : void
InitInstance ( ) : void
MakePixelPerfect ( ) : void

Makes the text mesh pixel perfect to the active camera. Automatically detects tk2dCamera if present Otherwise uses Camera.main

NumDrawnCharacters ( ) : int

Returns the number of characters drawn for the currently active string. This may be less than string.Length - some characters are used as escape codes for switching texture gradient ^0-^9 Also, there might be more characters in the string than have been allocated for the textmesh, in which case the string will be truncated.

NumTotalCharacters ( ) : int

Returns the number of characters excluding texture gradient escape codes.

PostAlignTextData ( int targetStart, int targetEnd, float offsetX ) : void
UpdateMaterial ( ) : void
UsesSpriteCollection ( tk2dSpriteCollectionData, spriteCollection ) : bool

보호된 메소드들

메소드 설명
OnDestroy ( ) : void

비공개 메소드들

메소드 설명
FillTextData ( ) : int
GetXAnchorForWidth ( float lineWidth ) : float
GetYAnchorForHeight ( float textHeight ) : float

메소드 상세

Awake() 공개 메소드

public Awake ( ) : void
리턴 void

Commit() 공개 메소드

Call commit after changing properties to commit the changes. This is deffered to a commit call as more than one operation may require rebuilding the buffers, eg. scaling and changing text. This will be wasteful if performed multiple times.
public Commit ( ) : void
리턴 void

ForceBuild() 공개 메소드

public ForceBuild ( ) : void
리턴 void

FormatText() 공개 메소드

public FormatText ( ) : void
리턴 void

GetMeshDimensionsForString() 공개 메소드

Calculates the mesh dimensions for the given string and returns a width and height.
public GetMeshDimensionsForString ( string str ) : Vector2
str string
리턴 Vector2

Init() 공개 메소드

public Init ( ) : void
리턴 void

Init() 공개 메소드

public Init ( bool force ) : void
force bool
리턴 void

InitInstance() 공개 메소드

public InitInstance ( ) : void
리턴 void

MakePixelPerfect() 공개 메소드

Makes the text mesh pixel perfect to the active camera. Automatically detects tk2dCamera if present Otherwise uses Camera.main
public MakePixelPerfect ( ) : void
리턴 void

NumDrawnCharacters() 공개 메소드

Returns the number of characters drawn for the currently active string. This may be less than string.Length - some characters are used as escape codes for switching texture gradient ^0-^9 Also, there might be more characters in the string than have been allocated for the textmesh, in which case the string will be truncated.
public NumDrawnCharacters ( ) : int
리턴 int

NumTotalCharacters() 공개 메소드

Returns the number of characters excluding texture gradient escape codes.
public NumTotalCharacters ( ) : int
리턴 int

OnDestroy() 보호된 메소드

protected OnDestroy ( ) : void
리턴 void

PostAlignTextData() 공개 메소드

public PostAlignTextData ( int targetStart, int targetEnd, float offsetX ) : void
targetStart int
targetEnd int
offsetX float
리턴 void

UpdateMaterial() 공개 메소드

public UpdateMaterial ( ) : void
리턴 void

UsesSpriteCollection() 공개 메소드

public UsesSpriteCollection ( tk2dSpriteCollectionData, spriteCollection ) : bool
spriteCollection tk2dSpriteCollectionData,
리턴 bool

프로퍼티 상세

lineSpacing 공개적으로 프로퍼티

Deprecated: Use LineSpacing instead. Additional line spacing for multiline text. This can be negative to bring lines closer together. This is in font local space.
public float lineSpacing
리턴 float

pixelPerfect 공개적으로 프로퍼티

Specifies if this textMesh is kept pixel perfect
public bool pixelPerfect
리턴 bool

spacing 공개적으로 프로퍼티

Deprecated: Use Spacing instead. Additional spacing between characters. This can be negative to bring characters closer together. This is in the font local space.
public float spacing
리턴 float