PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI Class Reference

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

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

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

Detailed Description

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.

Member Function Documentation

◆ Bark()

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

Barks the specified subtitle.

Parameters
subtitleSubtitle to bark.

Implements PixelCrushers.DialogueSystem.IBarkUI.

◆ Hide()

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

Hides the currently-playing bark.

Implements PixelCrushers.DialogueSystem.IBarkUI.

◆ OnDestroy()

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

If the barker is destroyed, also destroy its HUD Text.

◆ Start()

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.

Member Data Documentation

◆ checkIfPlayerVisible

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.

◆ defaultColor

Color PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.defaultColor = Color.white

The default color, unless overridden by an emphasis tag.

◆ duration

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

The duration in seconds to show the bark text.

◆ followTransform

Transform PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.followTransform

The transform to follow (usually a point above the NPC's head).

◆ hudTextPrefab

GameObject PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.hudTextPrefab

The HUD Text prefab to instantiate for the NPC's barks.

◆ visibilityLayerMask

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

The layer mask to use when checking for player visibility.

Property Documentation

◆ IsPlaying

bool PixelCrushers.DialogueSystem.NGUI.NGUIHUDTextBarkUI.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: