refactor: renamed some classes
This commit is contained in:
parent
0e7a535f6d
commit
6b1b935ea9
7 changed files with 10 additions and 10 deletions
|
@ -1,11 +1,11 @@
|
|||
using Domain;
|
||||
|
||||
namespace Presenter {
|
||||
public class CTrencadaClick {
|
||||
public class ExpressionClick {
|
||||
private readonly Model _model;
|
||||
private readonly ICTrencadaInput _view;
|
||||
private readonly IExpressionInput _view;
|
||||
|
||||
public CTrencadaClick(Model model, ICTrencadaInput view) {
|
||||
public ExpressionClick(Model model, IExpressionInput view) {
|
||||
_model = model;
|
||||
_view = view;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
namespace Presenter {
|
||||
public interface ICTrencadaInput {
|
||||
public interface IExpressionInput {
|
||||
void UpdateView(int score);
|
||||
}
|
||||
}
|
|
@ -5,15 +5,15 @@ using UnityEngine;
|
|||
|
||||
namespace View {
|
||||
public class Dependencies : MonoBehaviour {
|
||||
public CTrencadaClick CTrencadaClick { private set; get; }
|
||||
public ExpressionClick ExpressionClick { private set; get; }
|
||||
public Model Model { private set; get; }
|
||||
public CustomInput CustomInput { private set; get; }
|
||||
|
||||
private void Awake() {
|
||||
Model = new Model(0);
|
||||
|
||||
ICTrencadaInput input = FindObjectOfType<CTrencadaInput>();
|
||||
CTrencadaClick = new CTrencadaClick(Model, input);
|
||||
IExpressionInput input = FindObjectOfType<ExpressionInput>();
|
||||
ExpressionClick = new ExpressionClick(Model, input);
|
||||
|
||||
CustomInput = new CustomInput();
|
||||
}
|
||||
|
|
|
@ -5,13 +5,13 @@ using TMPro;
|
|||
using UnityEngine;
|
||||
|
||||
namespace View {
|
||||
public class CTrencadaInput : MonoBehaviour, ICTrencadaInput {
|
||||
public class ExpressionInput : MonoBehaviour, IExpressionInput {
|
||||
[SerializeField] private TMP_Text text;
|
||||
private CTrencadaClick _click;
|
||||
private ExpressionClick _click;
|
||||
private CustomInput _customInput;
|
||||
|
||||
private void Start() {
|
||||
_click = FindObjectOfType<Dependencies>().CTrencadaClick;
|
||||
_click = FindObjectOfType<Dependencies>().ExpressionClick;
|
||||
_customInput = FindObjectOfType<Dependencies>().CustomInput;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue