PixelCrushers.DialogueSystem.BarkStarter Class Reference

This is the base class for bark trigger components such as BarkOnIdle and BarkTrigger. More...

Inheritance diagram for PixelCrushers.DialogueSystem.BarkStarter:
Collaboration diagram for PixelCrushers.DialogueSystem.BarkStarter:

Public Member Functions

void TryBark (Transform target)
 Barks if the condition is true. More...
 
void TryBark (Transform target, Transform interactor)
 Barks if the condition is true. More...
 
void ResetBarkHistory ()
 Resets the bark history to the beginning of the list of bark lines. More...
 
void OnRecordPersistentData ()
 Listens for the OnRecordPersistentData message and records the current bark index. More...
 
void OnApplyPersistentData ()
 Listens for the OnApplyPersistentData message and retrieves the current bark index. More...
 
- Public Member Functions inherited from PixelCrushers.DialogueSystem.ConversationStarter
void TryStartConversation (Transform actor)
 If the condition is true, starts the conversation between the specified actor and the character that this component is attached to. More...
 
void TryStartConversation (Transform actor, Transform interactor)
 If the condition is true, starts the conversation between the specified actor and the character that this component is attached to. More...
 

Public Attributes

BarkOrder barkOrder = BarkOrder.Random
 Specifies the order to run through the list of barks. More...
 
bool allowDuringConversations = false
 Are barks allowed during conversations? More...
 
bool cacheBarkLines = false
 If ticked, bark info is cached during the first bark. More...
 
- Public Attributes inherited from PixelCrushers.DialogueSystem.ConversationStarter
string conversation
 The title of the conversation to start. More...
 
Condition condition
 The condition required for the conversation to start. More...
 
bool skipIfNoValidEntries
 If this is true<c/c> and no valid entries currently link from the start entry, don't start the conversation. More...
 
bool exclusive = false
 Only start if no other conversation is active. More...
 
Transform conversant
 The conversant of the conversation. More...
 
bool useConversationTitlePicker = true
 
DialogueDatabase selectedDatabase = null
 
- Public Attributes inherited from PixelCrushers.DialogueSystem.DialogueEventStarter
bool once = false
 Set true if this event should only happen once. More...
 

Protected Member Functions

virtual void Awake ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
- Protected Member Functions inherited from PixelCrushers.DialogueSystem.DialogueEventStarter
void DestroyIfOnce ()
 

Properties

Sequencer sequencer [get]
 Gets the sequencer used by the current bark, if a bark is playing. More...
 
int BarkIndex [get, set]
 Gets or sets the bark index for sequential barks. More...
 

Detailed Description

This is the base class for bark trigger components such as BarkOnIdle and BarkTrigger.

Member Function Documentation

◆ Awake()

virtual void PixelCrushers.DialogueSystem.BarkStarter.Awake ( )
protectedvirtual

◆ OnApplyPersistentData()

void PixelCrushers.DialogueSystem.BarkStarter.OnApplyPersistentData ( )

Listens for the OnApplyPersistentData message and retrieves the current bark index.

◆ OnDisable()

virtual void PixelCrushers.DialogueSystem.BarkStarter.OnDisable ( )
protectedvirtual

◆ OnEnable()

virtual void PixelCrushers.DialogueSystem.BarkStarter.OnEnable ( )
protectedvirtual

◆ OnRecordPersistentData()

void PixelCrushers.DialogueSystem.BarkStarter.OnRecordPersistentData ( )

Listens for the OnRecordPersistentData message and records the current bark index.

◆ ResetBarkHistory()

void PixelCrushers.DialogueSystem.BarkStarter.ResetBarkHistory ( )

Resets the bark history to the beginning of the list of bark lines.

◆ TryBark() [1/2]

void PixelCrushers.DialogueSystem.BarkStarter.TryBark ( Transform  target)

Barks if the condition is true.

Parameters
targetTarget.

◆ TryBark() [2/2]

void PixelCrushers.DialogueSystem.BarkStarter.TryBark ( Transform  target,
Transform  interactor 
)

Barks if the condition is true.

Parameters
targetTarget.
interactorInteractor to test the condition against.

Member Data Documentation

◆ allowDuringConversations

bool PixelCrushers.DialogueSystem.BarkStarter.allowDuringConversations = false

Are barks allowed during conversations?

◆ barkOrder

BarkOrder PixelCrushers.DialogueSystem.BarkStarter.barkOrder = BarkOrder.Random

Specifies the order to run through the list of barks.

  • Random: Choose a random bark from the conversation.
  • Sequential: Choose the barks in order from first to last, looping at the end.

◆ cacheBarkLines

bool PixelCrushers.DialogueSystem.BarkStarter.cacheBarkLines = false

If ticked, bark info is cached during the first bark.

This can reduce stutter when barking on slower mobile devices, but barks are not reevaluated each time as the state changes, barks use no em formatting codes, and sequences are not played with barks.

Property Documentation

◆ BarkIndex

int PixelCrushers.DialogueSystem.BarkStarter.BarkIndex
getset

Gets or sets the bark index for sequential barks.

The index of the bark, starting from 0.

◆ sequencer

Sequencer PixelCrushers.DialogueSystem.BarkStarter.sequencer
get

Gets the sequencer used by the current bark, if a bark is playing.

If a bark is not playing, this is undefined. To check if a bark is playing, check the bark UI's IsPlaying property.

The sequencer.


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