PixelCrushers.DialogueSystem.DialogueTime Class Reference

A static wrapper class for the built-in Time class. More...

Public Types

enum  TimeMode { TimeMode.Realtime, TimeMode.Gameplay, TimeMode.Custom }
 Dialogue System time mode. More...
 

Static Public Member Functions

static IEnumerator WaitForSeconds (float seconds)
 This version of WaitForSeconds respects DialogueTime. More...
 

Properties

static TimeMode Mode [get, set]
 Gets or sets the time mode. More...
 
static float? time [get, set]
 Gets the time based on the current Mode. More...
 
static bool? IsPaused [get, set]
 

Detailed Description

A static wrapper class for the built-in Time class.

This class allows the user to specify whether the dialogue system functions in realtime, gameplay time, or a custom time. If the game is paused during conversations by setting Time.timeScale = 0, then the Dialogue System should use realtime or it will also be paused. However, if you want the Dialogue System to observe the timeScale, then you can use gameplay time (for example, if you want the Sequencer to observe timeScale). If you want to manage time on your own, set the mode to Custom and manually set DialogueTime.time every frame.

Member Enumeration Documentation

◆ TimeMode

Dialogue System time mode.

Enumerator
Realtime 

Ignore Time.timeScale.

Internally, use Time.realtimeSinceStartup.

Gameplay 

Observe Time.timeScale.

Internally, use Time.time.

Custom 

Your code must manually manage the time.

Member Function Documentation

◆ WaitForSeconds()

static IEnumerator PixelCrushers.DialogueSystem.DialogueTime.WaitForSeconds ( float  seconds)
static

This version of WaitForSeconds respects DialogueTime.

Parameters
time
Returns

Property Documentation

◆ IsPaused

bool? PixelCrushers.DialogueSystem.DialogueTime.IsPaused
staticgetset

◆ Mode

TimeMode PixelCrushers.DialogueSystem.DialogueTime.Mode
staticgetset

Gets or sets the time mode.

The mode.

◆ time

float? PixelCrushers.DialogueSystem.DialogueTime.time
staticgetset

Gets the time based on the current Mode.

The time.


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