Table of Contents

Class TimeSystem

Namespace
Framework.Systems.Time
Assembly
Assembly-CSharp.dll

ITimeSystem 구현체. Unity Time API를 래핑해 Pause/TimeScale 제어를 추가.

public class TimeSystem : ITimeSystem
Inheritance
object
TimeSystem
Implements

Remarks

DeltaTime은 Pause 상태이면 0, 아니면 Time.deltaTime × TimeScale을 반환한다. Unity의 Time.timeScale은 건드리지 않고 자체 필드로 관리한다. RootScope에 Singleton으로 등록. TickRunner가 이 값을 읽어 TickSystem에 전달한다.

Properties

DeltaTime

Pause 상태이면 0, 아니면 Time.deltaTime * TimeScale.

public float DeltaTime { get; }

Property Value

float

IsPaused

현재 Pause 상태 여부.

public bool IsPaused { get; }

Property Value

bool

TimeScale

시간 배율. 0 이상 값만 허용. 슬로우모션/패스트포워드에 사용.

public float TimeScale { get; set; }

Property Value

float

UnscaledDeltaTime

TimeScale·Pause 영향 없는 실제 경과 시간.

public float UnscaledDeltaTime { get; }

Property Value

float

Methods

Pause()

시간 흐름 정지. DeltaTime이 0을 반환.

public void Pause()

Resume()

시간 흐름 재개.

public void Resume()