This is a "child" component created by UnityBarkUI. More...
Public Member Functions | |
virtual void | Awake () |
virtual void | Start () |
Starts this instance by computing the offset to the head of the character. More... | |
virtual void | Show (Subtitle subtitle, float duration, GUISkin guiSkin, string guiStyleName, TextStyle textStyle, bool includeName, Transform textPosition) |
Barks a subtitle. More... | |
virtual void | Show (Subtitle subtitle, float duration, GUISkin guiSkin, string guiStyleName, TextStyle textStyle, Color textStyleColor, bool includeName, Transform textPosition) |
Barks a subtitle. More... | |
IEnumerator | FadeOut (float fadeDuration) |
virtual void | OnGUI () |
Draws the bark text using Unity GUI. More... | |
Public Attributes | |
Vector3 | offset = Vector3.zero |
float | maxWidth = 0 |
Protected Member Functions | |
void | ComputeOffsetToHead () |
void | UpdateBarkPosition () |
Protected Attributes | |
GUISkin | guiSkin = null |
string | guiStyleName = null |
GUIStyle | guiStyle = null |
FormattedText | formattingToApply = null |
TextStyle | textStyle = TextStyle.None |
Color | textStyleColor = Color.black |
Vector2 | size |
string | message = null |
float | alpha = 1f |
Transform | myTransform |
Transform | absolutePosition |
Vector3 | offsetToHead = Vector3.zero |
The offset to the character's head, computed to be the top of the CharacterController or CapsuleCollider. More... | |
Vector3 | screenPos = Vector3.zero |
The screen position of the bark text. More... | |
Properties | |
bool | IsPlaying [get] |
Indicates whether this bark UI is currently showing a bark. More... | |
Vector3 | BarkPosition [get] |
Gets the position of the bark text in world space. More... | |
This is a "child" component created by UnityBarkUI.
For efficiency, this child component contains the OnGUI() method. This allows UnityBarkUI to enable and disable OnGUI() as necessary, since Unity has substantial overhead for every OnGUI() call, even if it exits immediately.
UnityBarkUI adds this component automatically if it doesn't already exist on the NPC. However, if you want to add an offset for the text, you can add this component manually and set the offset property.
|
virtual |
|
protected |
IEnumerator PixelCrushers.DialogueSystem.UnityGUI.UnityBarkUIOnGUI.FadeOut | ( | float | fadeDuration | ) |
|
virtual |
Draws the bark text using Unity GUI.
|
virtual |
Barks a subtitle.
Does not observe formatting codes in the subtitle's FormattedText, instead using the formatting settings defined on this component.
subtitle | Subtitle to bark. |
duration | Duration. |
guiSkin | GUI skin. |
guiStyleName | GUI style name. |
textStyle | Text style. |
includeName | Set true to include the barker's name in the text. |
textPosition | The absolute text position to use; if not set, text is positioned above the collider. |
|
virtual |
Barks a subtitle.
Does not observe formatting codes in the subtitle's FormattedText, instead using the formatting settings defined on this component.
subtitle | Subtitle to bark. |
duration | Duration. |
guiSkin | GUI skin. |
guiStyleName | GUI style name. |
textStyle | Text style. |
includeName | Set true to include the barker's name in the text. |
textPosition | The absolute text position to use; if not set, text is positioned above the collider. |
|
virtual |
Starts this instance by computing the offset to the head of the character.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float PixelCrushers.DialogueSystem.UnityGUI.UnityBarkUIOnGUI.maxWidth = 0 |
|
protected |
|
protected |
Vector3 PixelCrushers.DialogueSystem.UnityGUI.UnityBarkUIOnGUI.offset = Vector3.zero |
|
protected |
The offset to the character's head, computed to be the top of the CharacterController or CapsuleCollider.
|
protected |
The screen position of the bark text.
|
protected |
|
protected |
|
protected |
|
get |
Gets the position of the bark text in world space.
This value is only valid what a bark is playing.
The bark position.
|
get |
Indicates whether this bark UI is currently showing a bark.
true
if playing; otherwise, false
.