Commit 20e742af authored by ivarnm's avatar ivarnm
Browse files

LocalStorage implements ModelInterface

parent 1ed35ca3
package com.gameware.game.models;
public class LocalStorage {
import com.badlogic.gdx.utils.Json;
public class LocalStorage implements ModelInterface {
private Player player;
private Boolean musicOn;
private Boolean soundEffects;
......@@ -31,4 +33,24 @@ public class LocalStorage {
public Boolean getIncludeFin() {
return includeFin;
}
@Override
public void reset() {
player = null;
musicOn = true; // default value
soundEffects = true; // default value
includeFin = false; // default value
}
@Override
public String report() {
Json json = new Json();
json.setUsePrototypes(false);
return json.toJson(this);
}
@Override
public String toString() {
return report();
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment