Add startDialogue method to RuntimeInteractionDispatcher and handle it in RuntimeInteractionSystem
This commit is contained in:
@@ -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.`
|
||||
|
||||
Reference in New Issue
Block a user