PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI Class Reference

Implements IBarkUI using NGUI to show bark text above a character's head. More...

Inheritance diagram for PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI:
Collaboration diagram for PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI:

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...
 

Detailed Description

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.

Member Function Documentation

◆ Bark()

void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.Bark ( Subtitle  subtitle)

Barks the specified subtitle.

Parameters
subtitleSubtitle to bark.

Implements PixelCrushers.DialogueSystem.IBarkUI.

◆ Hide()

void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.Hide ( )

Hides the currently-playing bark.

Implements PixelCrushers.DialogueSystem.IBarkUI.

◆ OnContinue()

void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.OnContinue ( )

◆ OnDestroy()

void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.OnDestroy ( )

If the barker is destroyed, also destroy its bark label.

◆ Start()

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.

◆ Update()

void PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.Update ( )

Updates the seconds left and hides the label if time is up.

Member Data Documentation

◆ checkIfPlayerVisible

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

Color PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.color = Color.white

The color to use for the bark text.

◆ duration

float PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.duration = 5f

The duration in seconds to show the bark text before fading it out.

◆ effect

UILabel.Effect PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.effect = UILabel.Effect.None

The text effect to apply to the bark text.

◆ followBarker

bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.followBarker = true

Set true to make the bark text follow the barker.

◆ font

UIFont PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.font

The font to use for the bark text.

◆ includeName

bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.includeName = false

Set true to include the barker's name in the text.

◆ overrideBarkerTransform

Transform PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.overrideBarkerTransform

If set, follows this transform instead of the barker's.

◆ template

UILabel PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.template

If assigned, the bark uses this template when creating a UILabel.

◆ tweenScale

bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.tweenScale = true

Set true to bounce the size of the text in.

◆ visibilityLayerMask

LayerMask PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.visibilityLayerMask = 1

The layer mask to use when checking for player visibility.

◆ waitForContinueButton

bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.waitForContinueButton = false

Wait for an "OnContinue" message.

◆ waitUntilSequenceEnds

bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.waitUntilSequenceEnds

Set true to keep the bark text onscreen until the sequence ends.

Property Documentation

◆ IsPlaying

bool PixelCrushers.DialogueSystem.NGUI.NGUIBarkUI.IsPlaying
get

Indicates whether a bark is playing or not.

true if this instance is playing; otherwise, false.


The documentation for this class was generated from the following file: