Add startDialogue method to RuntimeInteractionDispatcher and handle it in RuntimeInteractionSystem

This commit is contained in:
2026-04-14 19:55:01 +02:00
parent 5193b20ddd
commit 30afd2129c

View File

@@ -32,6 +32,7 @@ export interface RuntimeInteractionDispatcher {
stopAnimation(instanceId: string, link: InteractionLink): void;
playSound(soundEmitterId: string, link: InteractionLink): void;
stopSound(soundEmitterId: string, link: InteractionLink): void;
startDialogue(dialogueId: string, link: InteractionLink): void;
dispatchControlEffect?(effect: ControlEffect, link: InteractionLink): void;
}
@@ -414,6 +415,9 @@ export class RuntimeInteractionSystem {
case "stopSound":
dispatcher.stopSound(link.action.targetSoundEmitterId, link);
break;
case "startDialogue":
dispatcher.startDialogue(link.action.dialogueId, link);
break;
case "control":
throw new Error(
`Runtime control action ${link.action.effect.type} could not be dispatched because the runtime dispatcher does not support control effects.`