added ambient sound feature
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -30,6 +30,12 @@
|
||||
</template>
|
||||
</asset-selector>
|
||||
|
||||
<asset-selector @select="assignAudio" :type="['Audio']">
|
||||
<template v-slot:activator="props">
|
||||
<v-btn v-bind="props" prepend-icon="mdi-volume-medium" block color="deep-purple-accent-2" class="my-4">Select ambient sound</v-btn>
|
||||
</template>
|
||||
</asset-selector>
|
||||
|
||||
<v-form class="py-4">
|
||||
<v-text-field density="compact" :label="l.name" v-model="modelValue.title"></v-text-field>
|
||||
<v-textarea :label="l.description" v-model="modelValue.description"></v-textarea>
|
||||
@@ -88,6 +94,9 @@ export default {
|
||||
assignIntro(e){
|
||||
this.modelValue.intro = e.id;
|
||||
},
|
||||
assignAudio(e){
|
||||
this.modelValue.audio = e.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user