Skip to content

ECS Framework API v2.1.50


ECS Framework API / ITimer

Interface: ITimer<TContext>

Defined in: Utils/Timers/ITimer.ts:1

Type Parameters

TContext

TContext = unknown

Properties

context

context: TContext

Defined in: Utils/Timers/ITimer.ts:2

Methods

stop()

stop(): void

Defined in: Utils/Timers/ITimer.ts:7

调用stop以停止此计时器再次运行。这对非重复计时器没有影响。

Returns

void


reset()

reset(): void

Defined in: Utils/Timers/ITimer.ts:12

将计时器的运行时间重置为0

Returns

void


getContext()

getContext<T>(): T

Defined in: Utils/Timers/ITimer.ts:17

返回投向T的上下文,作为方便

Type Parameters

T

T

Returns

T

Released under the MIT License.