demo state check
This commit is contained in:
parent
d6d0800566
commit
2217afaa64
@ -206,6 +206,7 @@ function registerEvents(store) {
|
||||
}
|
||||
|
||||
function setDemo(d) {
|
||||
|
||||
const initial = {
|
||||
players: d,
|
||||
combiner: [],
|
||||
@ -215,7 +216,8 @@ function registerEvents(store) {
|
||||
};
|
||||
|
||||
const startDemo = () => {
|
||||
console.log(initial);
|
||||
const { account } = store.getState();
|
||||
if (account) return false;
|
||||
store.dispatch(actions.setDemo(initial));
|
||||
store.dispatch(actions.setAnimTarget(null));
|
||||
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0] }))), 2000);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user