34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import audBite from "./art/sounds/bite.mp3";
|
|
import audDeath from "./art/sounds/death.mp3";
|
|
import audDig from "./art/sounds/dig.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 audSleep from "./art/sounds/sleep.mp3";
|
|
import { Sound } from "./sound.ts";
|
|
|
|
export let sndBite = new Sound(audBite);
|
|
export let sndDeath = new Sound(audDeath);
|
|
export let sndDig = new Sound(audDig);
|
|
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 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;
|
|
}
|