refactor delay matching logic
This commit is contained in:
@@ -89,10 +89,9 @@ function registerEvents(store) {
|
||||
const newRes = game.resolutions[game.resolutions.length - 2];
|
||||
console.log(newRes);
|
||||
return eachSeries(newRes, (r, cb) => {
|
||||
const timeout = r.delay;
|
||||
if (timeout === 0) return cb(); // TargetKo etc
|
||||
if (r.delay === 0) return cb(); // TargetKo etc
|
||||
setAnimations(r, store);
|
||||
return setTimeout(cb, timeout);
|
||||
return setTimeout(cb, r.delay);
|
||||
}, err => {
|
||||
if (err) return console.error(err);
|
||||
clearAnimations(store);
|
||||
|
||||
Reference in New Issue
Block a user