anim cleanup
This commit is contained in:
parent
d9563f8a9a
commit
e0cae50cc6
@ -73,21 +73,6 @@ function getObjects(resolution, game, account) {
|
||||
};
|
||||
}
|
||||
|
||||
function getSequence(resolution) {
|
||||
if (!resolution.event) return [];
|
||||
switch (resolution.stages) {
|
||||
case 'AllStages': return ['START_SKILL', 'END_SKILL', 'POST_SKILL'];
|
||||
case 'StartEnd': return ['START_SKILL', 'END_SKILL'];
|
||||
case 'StartPost': return ['START_SKILL', 'POST_SKILL'];
|
||||
case 'StartOnly': return ['START_SKILL'];
|
||||
case 'EndPost': return ['END_SKILL', 'POST_SKILL'];
|
||||
case 'EndOnly': return ['END_SKILL'];
|
||||
case 'PostOnly': return ['POST_SKILL'];
|
||||
case 'NoStages': return [];
|
||||
default: return ['START_SKILL', 'END_SKILL', 'POST_SKILL'];
|
||||
}
|
||||
}
|
||||
|
||||
function getTime(stages) {
|
||||
let time = 0;
|
||||
if (stages.includes('START_SKILL') && stages.includes('END_SKILL')) {
|
||||
@ -212,7 +197,6 @@ module.exports = {
|
||||
getFocusTargets,
|
||||
getObjects,
|
||||
getTime,
|
||||
getSequence,
|
||||
getText,
|
||||
isCbAnim,
|
||||
};
|
||||
|
||||
@ -63,10 +63,10 @@ function registerEvents(store) {
|
||||
if (game.resolved.length !== currentGame.resolved.length) {
|
||||
store.dispatch(actions.setAnimating(true));
|
||||
store.dispatch(actions.setGameSkillInfo(null));
|
||||
|
||||
// stop fetching the game state til animations are done
|
||||
const newRes = game.resolved.slice(currentGame.resolved.length);
|
||||
return eachSeries(newRes, (r, cb) => {
|
||||
if (!r.event) return cb;
|
||||
const timeout = animations.getTime(r.stages);
|
||||
const anims = animations.getObjects(r, game, account);
|
||||
const text = animations.getText(r);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user