feat: load system
This commit is contained in:
parent
5d470a57af
commit
60d20bfe4e
20 changed files with 421 additions and 67 deletions
21
Assets/Scripts/Presenter/SaveSystem/LoadGame.cs
Normal file
21
Assets/Scripts/Presenter/SaveSystem/LoadGame.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using Domain;
|
||||
|
||||
namespace Presenter.SaveSystem {
|
||||
public class LoadGame {
|
||||
private readonly IGameRepository _repository;
|
||||
private readonly Score _score;
|
||||
private readonly IExpressionInput _expressionInput;
|
||||
|
||||
public LoadGame(IGameRepository repository, Score score, IExpressionInput expressionInput) {
|
||||
_repository = repository;
|
||||
_score = score;
|
||||
_expressionInput = expressionInput;
|
||||
}
|
||||
|
||||
public void Run() {
|
||||
Score newScore = _repository.LoadScore();
|
||||
_score.SetFromOtherScore(newScore);
|
||||
_expressionInput.UpdateView(_score.Value, _score.GrowPercentage);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue