object touch events implemented

This commit is contained in:
azykov@mail.ru
2026-06-13 13:18:03 +03:00
parent 209ff3f710
commit 1ed3203ec5
6 changed files with 40 additions and 13 deletions
+3
View File
@@ -1,3 +1,4 @@
import { toJS } from "mobx";
import type { ScriptContext, ScriptCoroutineContext, ScriptGameEventHandler } from "../types";
import type { ScriptCoroutines } from "./coroutines";
@@ -36,6 +37,8 @@ export class ScriptGameEventBus {
}
emit(event: string, context: Omit<ScriptContext, keyof ScriptCoroutineContext>): void {
console.log('emitting ' + event, toJS(context));
const coroutines = this.handlers[event]
?.map((h) => ({
owner: h.coroutine.thisObject.id,