refactor: renamed Model.cs to Score.cs
This commit is contained in:
parent
2be3b572fb
commit
5d470a57af
8 changed files with 48 additions and 48 deletions
|
@ -7,11 +7,11 @@ using View.UI;
|
|||
namespace View {
|
||||
public class Dependencies : MonoBehaviour {
|
||||
public ExpressionClick ExpressionClick { private set; get; }
|
||||
public Model Model { private set; get; }
|
||||
public Score Score { private set; get; }
|
||||
public CustomInput CustomInput { private set; get; }
|
||||
|
||||
private void Awake() {
|
||||
Model = new Model(20, 5);
|
||||
Score = new Score(20, 5);
|
||||
|
||||
IExpressionInput input = FindObjectOfType<ExpressionInput>();
|
||||
IExpressionInput visibility = FindObjectOfType<UIVisibility>();
|
||||
|
@ -19,7 +19,7 @@ namespace View {
|
|||
|
||||
IRoseSpawner spawner = FindObjectOfType<RoseSpawner>();
|
||||
|
||||
ExpressionClick = new ExpressionClick(Model, inputCollections, spawner);
|
||||
ExpressionClick = new ExpressionClick(Score, inputCollections, spawner);
|
||||
|
||||
CustomInput = new CustomInput();
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@ namespace View.UI {
|
|||
|
||||
private ExpressionClick _click;
|
||||
private CustomInput _customInput;
|
||||
private Model _model;
|
||||
private Score _score;
|
||||
|
||||
[SerializeField] private FramedAnimator.FramedAnimator animator;
|
||||
|
||||
private void Start() {
|
||||
_model = FindObjectOfType<Dependencies>().Model;
|
||||
_score = FindObjectOfType<Dependencies>().Score;
|
||||
|
||||
_click = FindObjectOfType<Dependencies>().ExpressionClick;
|
||||
_customInput = FindObjectOfType<Dependencies>().CustomInput;
|
||||
|
@ -27,7 +27,7 @@ namespace View.UI {
|
|||
}
|
||||
|
||||
public void UpdateView(int score) {
|
||||
animator.PlayUntil(_model.GrowPercentage);
|
||||
animator.PlayUntil(_score.GrowPercentage);
|
||||
text.text = score.ToString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue