PixelCrushers.DialogueSystem.DialogueTime Class Reference

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

Public Types

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

Static Public Member Functions

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

Properties

static TimeMode mode [get, set]
 Gets or sets the time mode.
 
static float time [get, set]
 Gets the time based on the current Mode.
 
static float deltaTime [get, set]
 The frame delta time based on the current time mode.
 
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)
inlinestatic

This version of WaitForSeconds respects DialogueTime.

Parameters
time
Returns

Property Documentation

◆ deltaTime

float PixelCrushers.DialogueSystem.DialogueTime.deltaTime
staticgetset

The frame delta time based on the current time mode.

◆ isPaused

bool PixelCrushers.DialogueSystem.DialogueTime.isPaused
staticgetset

◆ mode

TimeMode PixelCrushers.DialogueSystem.DialogueTime.mode
staticgetset

Gets or sets the time mode.

Setting this also sets GameTime.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: