chore: logs
This commit is contained in:
parent
87e2f1b9ca
commit
daa5aa4b57
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user