export function audio_source(spatial: boolean, idle?: AudioClip) {
return (game: Game, entity: Entity) => {
let panner = spatial ? game.Audio.createPanner() : undefined;
game.World.Signature[entity] |= Has.AudioSource;
game.World.AudioSource[entity] = {
Panner: panner,
Idle: idle,
Time: 0,
};
};
}