added ambient sound feature

This commit is contained in:
2025-11-14 16:08:51 +02:00
parent 006d159a0f
commit 8eea84b697
5 changed files with 42 additions and 3 deletions
@@ -70,7 +70,10 @@ class InteractiveObject extends EventDispatcher{
this.io = await new InteractiveObjectsImports[obj.type](gameEngine, obj);
this.source = this.io.source || this.io;
this.object = this.io.object;
this.io.addEventListener?.('finish', this.dispatchEvent.bind(this))
this.emits = this.io.emits;
this.io.emits?.forEach(event=>{
this.io.addEventListener?.(event, this.dispatchEvent.bind(this))
})
break;
}
if (obj.shouldBeLocked){