This commit is contained in:
ntr 2019-07-19 19:10:44 +10:00
parent adf6700049
commit 4ea3adcff3

View File

@ -67,6 +67,7 @@ function registerEvents(store) {
if (sequence.includes('START_SKILL')) store.dispatch(actions.setAnimSource(anims.animSource));
if (sequence.includes('END_SKILL')) store.dispatch(actions.setAnimTarget(anims.animTarget));
if (sequence.includes('POST_SKILL')) {
// timeout to prevent text classes from being added too soon
setTimeout(
() => store.dispatch(actions.setAnimText(text)),
timeout - 1000,
@ -79,6 +80,7 @@ function registerEvents(store) {
store.dispatch(actions.setAnimText(null));
return setTimeout(cb, 50);
}, timeout);
}, err => {
if (err) return console.error(err);
// clear animation state