chore: organized project ui structure
This commit is contained in:
parent
58ec07b1a0
commit
d6c618add0
10 changed files with 8 additions and 4 deletions
|
@ -1,49 +0,0 @@
|
|||
using Domain;
|
||||
using Domain.Input;
|
||||
using Presenter;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace View {
|
||||
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();
|
||||
}
|
||||
|
||||
private void CheckInput() {
|
||||
_customInput.UpdateInput();
|
||||
|
||||
if (_customInput.KeyDown(typeof(GeminadaReader)))
|
||||
_click.Execute();
|
||||
if (_customInput.KeyDown(typeof(CedillaReader)))
|
||||
_click.Execute();
|
||||
if (_customInput.KeyDown(typeof(IxReader)))
|
||||
_click.Execute();
|
||||
if (_customInput.KeyDown(typeof(LlReader)))
|
||||
_click.Execute();
|
||||
if (_customInput.KeyDown(typeof(NyReader)))
|
||||
_click.Execute();
|
||||
if (_customInput.KeyDown(typeof(SsReader)))
|
||||
_click.Execute();
|
||||
if (_customInput.KeyDown(typeof(TgReader)))
|
||||
_click.Execute();
|
||||
if (_customInput.KeyDown(typeof(TjReader)))
|
||||
_click.Execute();
|
||||
if (_customInput.KeyDown(typeof(TxReader)))
|
||||
_click.Execute();
|
||||
}
|
||||
|
||||
public void UpdateView(int score) {
|
||||
text.text = score.ToString();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue