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;
|
using Domain;
|
||||||
|
|
||||||
namespace Presenter {
|
namespace Presenter {
|
||||||
public class CTrencadaClick {
|
public class ExpressionClick {
|
||||||
private readonly Model _model;
|
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;
|
_model = model;
|
||||||
_view = view;
|
_view = view;
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
namespace Presenter {
|
namespace Presenter {
|
||||||
public interface ICTrencadaInput {
|
public interface IExpressionInput {
|
||||||
void UpdateView(int score);
|
void UpdateView(int score);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,15 +5,15 @@ using UnityEngine;
|
||||||
|
|
||||||
namespace View {
|
namespace View {
|
||||||
public class Dependencies : MonoBehaviour {
|
public class Dependencies : MonoBehaviour {
|
||||||
public CTrencadaClick CTrencadaClick { private set; get; }
|
public ExpressionClick ExpressionClick { private set; get; }
|
||||||
public Model Model { private set; get; }
|
public Model Model { private set; get; }
|
||||||
public CustomInput CustomInput { private set; get; }
|
public CustomInput CustomInput { private set; get; }
|
||||||
|
|
||||||
private void Awake() {
|
private void Awake() {
|
||||||
Model = new Model(0);
|
Model = new Model(0);
|
||||||
|
|
||||||
ICTrencadaInput input = FindObjectOfType<CTrencadaInput>();
|
IExpressionInput input = FindObjectOfType<ExpressionInput>();
|
||||||
CTrencadaClick = new CTrencadaClick(Model, input);
|
ExpressionClick = new ExpressionClick(Model, input);
|
||||||
|
|
||||||
CustomInput = new CustomInput();
|
CustomInput = new CustomInput();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,13 @@ using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace View {
|
namespace View {
|
||||||
public class CTrencadaInput : MonoBehaviour, ICTrencadaInput {
|
public class ExpressionInput : MonoBehaviour, IExpressionInput {
|
||||||
[SerializeField] private TMP_Text text;
|
[SerializeField] private TMP_Text text;
|
||||||
private CTrencadaClick _click;
|
private ExpressionClick _click;
|
||||||
private CustomInput _customInput;
|
private CustomInput _customInput;
|
||||||
|
|
||||||
private void Start() {
|
private void Start() {
|
||||||
_click = FindObjectOfType<Dependencies>().CTrencadaClick;
|
_click = FindObjectOfType<Dependencies>().ExpressionClick;
|
||||||
_customInput = FindObjectOfType<Dependencies>().CustomInput;
|
_customInput = FindObjectOfType<Dependencies>().CustomInput;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue