Implements IBarkUI using NGUI HUDText to show bark text above a character's head. More...
Public Member Functions | |
void | Start () |
Starts the component by adding a bark label to the UIBarkRoot object, which should be found in an NGUI UI. More... | |
void | OnDestroy () |
If the barker is destroyed, also destroy its HUD Text. More... | |
void | Bark (Subtitle subtitle) |
Barks the specified subtitle. More... | |
void | Hide () |
Hides the currently-playing bark. More... | |
Public Attributes | |
GameObject | hudTextPrefab |
The HUD Text prefab to instantiate for the NPC's barks. More... | |
Transform | followTransform |
The transform to follow (usually a point above the NPC's head). More... | |
Color | defaultColor = Color.white |
The default color, unless overridden by an emphasis tag. More... | |
float | duration = 5f |
The duration in seconds to show the bark text. More... | |
bool | checkIfPlayerVisible = true |
Set true to run a raycast to the player. More... | |
LayerMask | visibilityLayerMask = 1 |
The layer mask to use when checking for player visibility. More... | |
Properties | |
bool | IsPlaying [get] |
Indicates whether a bark is playing or not. More... | |
Properties inherited from PixelCrushers.DialogueSystem.IBarkUI | |
bool | IsPlaying [get] |
Indicates or sets whether a bark is playing. More... | |
Implements IBarkUI using NGUI HUDText to show bark text above a character's head.
Assign a HUD Text prefab and a Follow Transform (usually a child object above the character's head).
Your scene should also have a UIRoot with a HUDRoot somewhere in it.
void PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.Bark | ( | Subtitle | subtitle | ) |
Barks the specified subtitle.
subtitle | Subtitle to bark. |
Implements PixelCrushers.DialogueSystem.IBarkUI.
void PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.Hide | ( | ) |
Hides the currently-playing bark.
Implements PixelCrushers.DialogueSystem.IBarkUI.
void PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.OnDestroy | ( | ) |
If the barker is destroyed, also destroy its HUD Text.
void PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.Start | ( | ) |
Starts the component by adding a bark label to the UIBarkRoot object, which should be found in an NGUI UI.
bool PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.checkIfPlayerVisible = true |
Set true
to run a raycast to the player.
If the ray is blocked (e.g., a wall blocks visibility to the player), don't show the bark.
Color PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.defaultColor = Color.white |
The default color, unless overridden by an emphasis tag.
float PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.duration = 5f |
The duration in seconds to show the bark text.
Transform PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.followTransform |
The transform to follow (usually a point above the NPC's head).
GameObject PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.hudTextPrefab |
The HUD Text prefab to instantiate for the NPC's barks.
LayerMask PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.visibilityLayerMask = 1 |
The layer mask to use when checking for player visibility.
|
get |
Indicates whether a bark is playing or not.
true
if this instance is playing; otherwise, false
.