31 lines
No EOL
686 B
C#
31 lines
No EOL
686 B
C#
using Domain;
|
|
using Presenter;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
namespace View.UI {
|
|
public class ExpressionInput : MonoBehaviour, IExpressionInput {
|
|
[SerializeField] private TMP_Text text;
|
|
|
|
private ExpressionClick _click;
|
|
private CustomInput _customInput;
|
|
|
|
private void Start() {
|
|
_click = FindObjectOfType<Dependencies>().ExpressionClick;
|
|
_customInput = FindObjectOfType<Dependencies>().CustomInput;
|
|
}
|
|
|
|
private void Update() =>
|
|
CheckInput();
|
|
|
|
public void UpdateView(int score, float growPercentage) =>
|
|
text.text = score.ToString();
|
|
|
|
private void CheckInput() {
|
|
_customInput.UpdateInput();
|
|
|
|
if (_customInput.AnyKeyDown())
|
|
_click.Execute();
|
|
}
|
|
}
|
|
} |