object move blocks
debug floaters
This commit is contained in:
@@ -36,15 +36,12 @@ export class ScriptGameEventBus {
|
||||
}
|
||||
|
||||
emit(event: string, context: Omit<ScriptContext, keyof ScriptCoroutineContext>): void {
|
||||
console.log('emitting ' + event);
|
||||
|
||||
const coroutines = this.handlers[event]
|
||||
?.map((h) => {
|
||||
console.log(`passing ${event} to ${h.handler}(${JSON.stringify(context)}, ${JSON.stringify(h.coroutine)})`);
|
||||
return h.handler({ ...context, ...h.coroutine });
|
||||
});
|
||||
|
||||
console.log(coroutines);
|
||||
?.map((h) => ({
|
||||
owner: h.coroutine.thisObject.id,
|
||||
name: `${h.coroutine.thisObjectType.name}[${h.coroutine.thisObject.id}]:${event}`,
|
||||
coroutine: h.handler({ ...context, ...h.coroutine }),
|
||||
}));
|
||||
|
||||
if (coroutines)
|
||||
this.coroutines.push(coroutines);
|
||||
|
||||
Reference in New Issue
Block a user