static private ReserveSoundID ( SoundType type ) : int | ||
type | SoundType | |
return | int |
internal static int ReserveSoundID(SoundType type)
{
int reserveID = nextSound[type];
nextSound[type]++;
return reserveID;
}
public void AddSound(SoundType type, string soundPath, ModSound modSound = null) { int id = SoundLoader.ReserveSoundID(type); SoundLoader.sounds[type][soundPath] = id; if (modSound != null) { SoundLoader.modSounds[type][id] = modSound; modSound.sound = ModLoader.GetSound(soundPath); } }