Example #1
0
store.getStep = id => {
  return store.$get('_step_' + id, 0);
}
Example #2
0
    Object.keys(store[key]).map((k) => {
      store[key][k] = undefined;
    });
  } else {
    store[key] = undefined;
  }
  console.log("deleted", store[key]);
  localStorage.removeItem(key);
}

/*
Store
*/
store.music = store.$get('music', {
  name: "永久に_Elements Garden",
  src: "http://7sbo48.com2.z0.glb.clouddn.com/music/chapter01.mp3",
  switchy: true
}, JSON.parse, true);
store.constrols = store.$get('controls', {
  fullscreen: false,
  theme: 'light'
}, JSON.parse, true);
store.profile = store.$get('profile', {
    name: undefined,
    year: 2016
}, JSON.parse, true);
store.story = store.$get('story', undefined);
store.scene = store.$get('scene', undefined);
store.introduction = store.$get('introduction', false);