public void UpdateView(MovementSelectorModel model) { executionTimeInputField.text = model.ExecutionTime.ToString(CultureInfo.InstalledUICulture); radiusInputField.text = model.Radius.ToString(CultureInfo.InstalledUICulture); spikeAmountInputField.text = model.Spikes.ToString(); circlesAmountInputField.text = model.Circles.ToString(); statesDropdown.value = (int)model.CurrentMoveState; statesDropdown.RefreshShownValue(); UpdateStateUi(model.CurrentMoveState); uiGameObject.SetActive(model.CurrentUiState == UiState.Waiting); }
public MovementSelectorController( IMoveExecutor moveExecutor, IMovementSelectorView view, MovementSelectorModel model ) { this.view = view; this.moveExecutor = moveExecutor; this.model = model; view.Initialize(this); view.UpdateView(model); }
private void Awake() { var lineEnd = endPoint.position; var lineStart = startPoint.position; var model = new MovementSelectorModel { Target = target, LineStartPoint = lineStart, LineFinishPoint = lineEnd, SpikeStartPoint = lineStart, SpikeFinishPoint = lineEnd, SpiralCenterPoint = centerPoint.position, Circles = defaultCircles, Spikes = defaultSpikes, ExecutionTime = defaultExecutionTime, Radius = defaultRadius }; var movementSelectorController = new MovementSelectorController(moveExecutor, view, model); }