Loading Assets/Scripts/Presenter/ExpressionClick.cs +3 −3 Original line number Diff line number Diff line Loading @@ -3,14 +3,14 @@ namespace Presenter { public class ExpressionClick { private readonly Score _score; private readonly IExpressionInput _view; private readonly IScoreView _view; private readonly IRoseGrow _grow; private readonly IInputCallback _onInputReceived; private readonly IRoseSpawner _spawner; private bool CanSpawn => _score.Value % (_score.GrowIterations * _score.SpawnRate) == 0; public ExpressionClick(Score score, IExpressionInput view, IRoseSpawner spawner, IRoseGrow grow, IInputCallback inputCallback) { public ExpressionClick(Score score, IScoreView view, IRoseSpawner spawner, IRoseGrow grow, IInputCallback inputCallback) { _score = score; _view = view; _spawner = spawner; Loading @@ -20,7 +20,7 @@ namespace Presenter { public void Execute() { _score.Add(); _view.UpdateView(_score.Value, _score.GrowPercentage); _view.UpdateView(_score.Value); _onInputReceived.OnInputReceived(); if (CanSpawn) Loading Assets/Scripts/Presenter/IExpressionInput.csdeleted 100644 → 0 +0 −5 Original line number Diff line number Diff line namespace Presenter { public interface IExpressionInput { void UpdateView(int score, float growPercentage); } } No newline at end of file Assets/Scripts/Presenter/IScoreView.cs 0 → 100644 +5 −0 Original line number Diff line number Diff line namespace Presenter { public interface IScoreView { void UpdateView(int score); } } No newline at end of file Assets/Scripts/Presenter/IExpressionInput.cs.meta→Assets/Scripts/Presenter/IScoreView.cs.meta +0 −0 File moved. View file Assets/Scripts/Presenter/SaveSystem/LoadGame.cs +4 −4 Original line number Diff line number Diff line Loading @@ -4,14 +4,14 @@ namespace Presenter.SaveSystem { public class LoadGame { private readonly IGameRepository _repository; private readonly Score _score; private readonly IExpressionInput _expressionInput; private readonly IScoreView _scoreView; private readonly IRoseSpawner _spawner; private readonly IRoseGrow _growAnimation; public LoadGame(IGameRepository repository, Score score, IExpressionInput expressionInput, IRoseSpawner spawner, IRoseGrow growAnimation) { public LoadGame(IGameRepository repository, Score score, IScoreView scoreView, IRoseSpawner spawner, IRoseGrow growAnimation) { _repository = repository; _score = score; _expressionInput = expressionInput; _scoreView = scoreView; _spawner = spawner; _growAnimation = growAnimation; } Loading @@ -19,7 +19,7 @@ namespace Presenter.SaveSystem { public void Run() { Score newScore = _repository.LoadScore(); _score.SetFromOtherScore(newScore); _expressionInput.UpdateView(_score.Value, _score.GrowPercentage); _scoreView.UpdateView(_score.Value); _growAnimation.GrowStep(); int roses = _score.Value / (_score.SpawnRate * _score.GrowIterations); Loading Loading
Assets/Scripts/Presenter/ExpressionClick.cs +3 −3 Original line number Diff line number Diff line Loading @@ -3,14 +3,14 @@ namespace Presenter { public class ExpressionClick { private readonly Score _score; private readonly IExpressionInput _view; private readonly IScoreView _view; private readonly IRoseGrow _grow; private readonly IInputCallback _onInputReceived; private readonly IRoseSpawner _spawner; private bool CanSpawn => _score.Value % (_score.GrowIterations * _score.SpawnRate) == 0; public ExpressionClick(Score score, IExpressionInput view, IRoseSpawner spawner, IRoseGrow grow, IInputCallback inputCallback) { public ExpressionClick(Score score, IScoreView view, IRoseSpawner spawner, IRoseGrow grow, IInputCallback inputCallback) { _score = score; _view = view; _spawner = spawner; Loading @@ -20,7 +20,7 @@ namespace Presenter { public void Execute() { _score.Add(); _view.UpdateView(_score.Value, _score.GrowPercentage); _view.UpdateView(_score.Value); _onInputReceived.OnInputReceived(); if (CanSpawn) Loading
Assets/Scripts/Presenter/IExpressionInput.csdeleted 100644 → 0 +0 −5 Original line number Diff line number Diff line namespace Presenter { public interface IExpressionInput { void UpdateView(int score, float growPercentage); } } No newline at end of file
Assets/Scripts/Presenter/IScoreView.cs 0 → 100644 +5 −0 Original line number Diff line number Diff line namespace Presenter { public interface IScoreView { void UpdateView(int score); } } No newline at end of file
Assets/Scripts/Presenter/IExpressionInput.cs.meta→Assets/Scripts/Presenter/IScoreView.cs.meta +0 −0 File moved. View file
Assets/Scripts/Presenter/SaveSystem/LoadGame.cs +4 −4 Original line number Diff line number Diff line Loading @@ -4,14 +4,14 @@ namespace Presenter.SaveSystem { public class LoadGame { private readonly IGameRepository _repository; private readonly Score _score; private readonly IExpressionInput _expressionInput; private readonly IScoreView _scoreView; private readonly IRoseSpawner _spawner; private readonly IRoseGrow _growAnimation; public LoadGame(IGameRepository repository, Score score, IExpressionInput expressionInput, IRoseSpawner spawner, IRoseGrow growAnimation) { public LoadGame(IGameRepository repository, Score score, IScoreView scoreView, IRoseSpawner spawner, IRoseGrow growAnimation) { _repository = repository; _score = score; _expressionInput = expressionInput; _scoreView = scoreView; _spawner = spawner; _growAnimation = growAnimation; } Loading @@ -19,7 +19,7 @@ namespace Presenter.SaveSystem { public void Run() { Score newScore = _repository.LoadScore(); _score.SetFromOtherScore(newScore); _expressionInput.UpdateView(_score.Value, _score.GrowPercentage); _scoreView.UpdateView(_score.Value); _growAnimation.GrowStep(); int roses = _score.Value / (_score.SpawnRate * _score.GrowIterations); Loading