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

Method _emitEvent

packages/effect/src/core/EffectContainer.ts:108–118  ·  view source on GitHub ↗
(type: EffectEventType, effect: IEffectInstance, data?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

106 }
107
108 private _emitEvent(type: EffectEventType, effect: IEffectInstance, data?: Record<string, unknown>): void {
109 const event: IEffectEvent = {
110 type,
111 effect,
112 targetId: this._targetId,
113 timestamp: Date.now(),
114 data
115 };
116
117 this._listeners.get(type)?.forEach(listener => listener(event));
118 }
119
120 /**
121 * @zh 应用效果

Callers 4

applyMethod · 0.95
_handleStackingMethod · 0.95
removeMethod · 0.95
updateMethod · 0.95

Calls 3

nowMethod · 0.80
getMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected