var file = {
score: Game.scene.score,
visits: Game.scene.visits
};
localStorage.setItem('saveFile',JSON.stringify(file));
};
Game.loadFile = function(){
var file = JSON.parse(localStorage.getItem('saveFile'));
Game.scene.score = file.score;
Game.scene.visits = file.visits;
};
I should not edit it or anything? ..just paste it like it is? Withing the <script> tag ??
Paste the entire code segment inside game.js
@newbyte i.will give you feed back.when i.try this
Обсуждают сегодня