demo state check

This commit is contained in:
ntr 2019-09-19 22:33:07 +10:00
parent d6d0800566
commit 2217afaa64

View File

@ -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);