MCPcopy Create free account
hub / github.com/esengine/esengine / update

Method update

packages/fsm/src/StateMachine.ts:332–341  ·  view source on GitHub ↗
(deltaTime: number)

Source from the content-addressed store, hash-verified

330 // =========================================================================
331
332 update(deltaTime: number): void {
333 const config = this.states.get(this._current);
334 if (config?.onUpdate) {
335 try {
336 config.onUpdate(this._context, deltaTime);
337 } catch (error) {
338 console.error(`StateMachine: Error in onUpdate for state '${this._current}':`, error);
339 }
340 }
341 }
342
343 reset(initialState?: TState): void {
344 const targetState = initialState ?? this._current;

Callers

nothing calls this directly

Calls 3

getMethod · 0.65
onUpdateMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected