UNPKG

arx-level-generator

Version:
34 lines (33 loc) 832 B
import { Variable } from '../properties/Variable.js'; export declare enum SoundFlags { None = 0, EmitFromPlayer = 1, Loop = 2, Unique = 4, VaryPitch = 8 } export declare class Sound { filename: string | Variable<string>; flags: SoundFlags; /** * Don't forget to add the audio to an entity's otherDependencies if you are * using custom files */ constructor(filename: string | Variable<string>, flags?: SoundFlags); play(): string; /** * only works if the sound has the unique flag * @see SoundFlags.Unique */ stop(): string; private getFilename; /** * [o] = emit from player * [l] = loop * [i] = unique * [p] = variable pitch * [s] = stop (only if unique) */ private stringifyFlags; isStoppable(): boolean; }