32 lines
No EOL
634 B
C#
32 lines
No EOL
634 B
C#
using Domain;
|
|
using Presenter;
|
|
using SatorImaging.AppWindowUtility;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
namespace View {
|
|
public class CTrencadaInput : MonoBehaviour, ICTrencadaInput {
|
|
[SerializeField] private TMP_Text text;
|
|
private CTrencadaClick _click;
|
|
|
|
private void Start() {
|
|
AppWindowUtility.AlwaysOnTop = true;
|
|
|
|
_click = FindObjectOfType<Dependencies>().CTrencadaClick;
|
|
}
|
|
|
|
private void Update() {
|
|
CheckInput();
|
|
}
|
|
|
|
private void CheckInput() {
|
|
Win32API.UpdateInput();
|
|
if (Win32API.CTrencadaDown())
|
|
_click.Execute();
|
|
}
|
|
|
|
public void UpdateView(int score) {
|
|
text.text = score.ToString();
|
|
}
|
|
}
|
|
} |