Implements IBarkUI using NGUI 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 | Update () |
Updates the seconds left and hides the label if time is up. More... | |
void | OnDestroy () |
If the barker is destroyed, also destroy its bark label. More... | |
void | Bark (Subtitle subtitle) |
Barks the specified subtitle. More... | |
void | OnContinue () |
void | Hide () |
Hides the currently-playing bark. More... | |
Public Attributes | |
UILabel | template |
If assigned, the bark uses this template when creating a UILabel. More... | |
bool | includeName = false |
Set true to include the barker's name in the text. More... | |
UIFont | font |
The font to use for the bark text. More... | |
Color | color = Color.white |
The color to use for the bark text. More... | |
UILabel.Effect | effect = UILabel.Effect.None |
The text effect to apply to the bark text. More... | |
bool | tweenScale = true |
Set true to bounce the size of the text in. More... | |
float | duration = 5f |
The duration in seconds to show the bark text before fading it out. More... | |
bool | followBarker = true |
Set true to make the bark text follow the barker. More... | |
Transform | overrideBarkerTransform |
If set, follows this transform instead of the barker's. More... | |
bool | waitUntilSequenceEnds |
Set true to keep the bark text onscreen until the sequence ends. More... | |
bool | waitForContinueButton = false |
Wait for an "OnContinue" message. 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 to show bark text above a character's head.
To use this component, add it to an NPC. You must also set up a single UIBarkRoot in your NGUI UI. All NGUIBarkUI instances will add their labels to this UIBarkRoot. Instead of using the appearance properties below (font, color, etc.), you can create a template label in the bark root and assign the template property. The bark UI system will use this template instead.
void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.Bark | ( | Subtitle | subtitle | ) |
Barks the specified subtitle.
subtitle | Subtitle to bark. |
Implements PixelCrushers.DialogueSystem.IBarkUI.
void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.Hide | ( | ) |
Hides the currently-playing bark.
Implements PixelCrushers.DialogueSystem.IBarkUI.
void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.OnContinue | ( | ) |
void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.OnDestroy | ( | ) |
If the barker is destroyed, also destroy its bark label.
void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.Start | ( | ) |
Starts the component by adding a bark label to the UIBarkRoot object, which should be found in an NGUI UI.
void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.Update | ( | ) |
Updates the seconds left and hides the label if time is up.
bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.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.NGUIBarkUI.color = Color.white |
The color to use for the bark text.
float PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.duration = 5f |
The duration in seconds to show the bark text before fading it out.
UILabel.Effect PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.effect = UILabel.Effect.None |
The text effect to apply to the bark text.
bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.followBarker = true |
Set true
to make the bark text follow the barker.
UIFont PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.font |
The font to use for the bark text.
bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.includeName = false |
Set true
to include the barker's name in the text.
Transform PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.overrideBarkerTransform |
If set, follows this transform instead of the barker's.
UILabel PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.template |
If assigned, the bark uses this template when creating a UILabel.
bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.tweenScale = true |
Set true
to bounce the size of the text in.
LayerMask PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.visibilityLayerMask = 1 |
The layer mask to use when checking for player visibility.
bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.waitForContinueButton = false |
Wait for an "OnContinue" message.
bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.waitUntilSequenceEnds |
Set true
to keep the bark text onscreen until the sequence ends.
|
get |
Indicates whether a bark is playing or not.
true
if this instance is playing; otherwise, false
.