directAudioActions.d.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { Action } from "./action";
  2. import type { Condition } from "./condition";
  3. import type { Sound } from "../Audio/sound";
  4. /**
  5. * This defines an action helpful to play a defined sound on a triggered action.
  6. */
  7. export declare class PlaySoundAction extends Action {
  8. private _sound;
  9. /**
  10. * Instantiate the action
  11. * @param triggerOptions defines the trigger options
  12. * @param sound defines the sound to play
  13. * @param condition defines the trigger related conditions
  14. */
  15. constructor(triggerOptions: any, sound: Sound, condition?: Condition);
  16. /** @internal */
  17. _prepare(): void;
  18. /**
  19. * Execute the action and play the sound.
  20. */
  21. execute(): void;
  22. /**
  23. * Serializes the actions and its related information.
  24. * @param parent defines the object to serialize in
  25. * @returns the serialized object
  26. */
  27. serialize(parent: any): any;
  28. }
  29. /**
  30. * This defines an action helpful to stop a defined sound on a triggered action.
  31. */
  32. export declare class StopSoundAction extends Action {
  33. private _sound;
  34. /**
  35. * Instantiate the action
  36. * @param triggerOptions defines the trigger options
  37. * @param sound defines the sound to stop
  38. * @param condition defines the trigger related conditions
  39. */
  40. constructor(triggerOptions: any, sound: Sound, condition?: Condition);
  41. /** @internal */
  42. _prepare(): void;
  43. /**
  44. * Execute the action and stop the sound.
  45. */
  46. execute(): void;
  47. /**
  48. * Serializes the actions and its related information.
  49. * @param parent defines the object to serialize in
  50. * @returns the serialized object
  51. */
  52. serialize(parent: any): any;
  53. }