chore: logs

This commit is contained in:
cha0s 2022-04-05 15:01:13 -05:00
parent 87e2f1b9ca
commit daa5aa4b57

View File

@ -4,6 +4,7 @@ import D from 'debug';
import Sound from '../sound';
const debug = D('@avocado/sound/audible');
const debugSilly = debug.extend('silly');
export default () => class Audible extends Trait {
@ -72,7 +73,7 @@ export default () => class Audible extends Trait {
hasSound: (key) => !!this.$$sounds[key],
playSound: (key) => {
debug('Checking %s', key);
debugSilly('Checking %s', key);
if (!this.entity.hasSound(key)) {
try {
this.$$sounds[key] = Sound.load({extends: key})
@ -90,7 +91,7 @@ export default () => class Audible extends Trait {
}
if ('web' === process.env.FLECKS_CORE_BUILD_TARGET) {
Promise.resolve(this.$$sounds[key]).then((sound) => {
debug('Playing %s', key);
debugSilly('Playing %s', key);
sound.play();
});
}