feat: load system

This commit is contained in:
Gerard Gascón 2024-04-17 00:37:39 +02:00
parent 5d470a57af
commit 60d20bfe4e
20 changed files with 421 additions and 67 deletions

View file

@ -0,0 +1,16 @@
using Domain;
using Presenter.SaveSystem;
using UnityEngine;
namespace Presenter {
public class PlayerPrefsRepository : IGameRepository {
public void SaveScore(Score score) {
PlayerPrefs.SetInt("Score", score.Value);
}
public Score LoadScore() {
int score = PlayerPrefs.GetInt("Score", 0);
return new Score(score, 0, 0);
}
}
}