40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import audBite from "./art/sounds/bite.mp3";
|
|
import audCollect from "./art/sounds/collect.mp3";
|
|
import audDeath from "./art/sounds/death.mp3";
|
|
import audDig from "./art/sounds/dig.mp3";
|
|
import audEnding from "./art/sounds/ending.mp3";
|
|
import audRecruit from "./art/sounds/recruit.mp3";
|
|
import audRewardBig from "./art/sounds/reward_big.mp3";
|
|
import audRewardHuge from "./art/sounds/reward_huge.mp3";
|
|
import audRewardMedium from "./art/sounds/reward_medium.mp3";
|
|
import audRewardSmall from "./art/sounds/reward_small.mp3";
|
|
import audSilence from "./art/sounds/silence.mp3";
|
|
import audSleep from "./art/sounds/sleep.mp3";
|
|
import { Sound } from "./sound.ts";
|
|
|
|
export let sndBite = new Sound(audBite);
|
|
export let sndCollect = new Sound(audCollect);
|
|
export let sndDeath = new Sound(audDeath);
|
|
export let sndDig = new Sound(audDig);
|
|
export let sndEnding = new Sound(audEnding);
|
|
export let sndRecruit = new Sound(audRecruit);
|
|
export let sndRewardBig = new Sound(audRewardBig);
|
|
export let sndRewardHuge = new Sound(audRewardHuge);
|
|
export let sndRewardMedium = new Sound(audRewardMedium);
|
|
export let sndRewardSmall = new Sound(audRewardSmall);
|
|
export let sndSilence = new Sound(audSilence);
|
|
export let sndSleep = new Sound(audSleep);
|
|
|
|
export function sndRewardFor(amount: number) {
|
|
if (amount <= 1) {
|
|
return sndRewardSmall;
|
|
}
|
|
if (amount <= 2) {
|
|
return sndRewardMedium;
|
|
}
|
|
if (amount <= 3) {
|
|
return sndRewardBig;
|
|
}
|
|
return sndRewardHuge;
|
|
}
|