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);
        }
Ejemplo n.º 2
0
        public MovementSelectorController(
            IMoveExecutor moveExecutor,
            IMovementSelectorView view,
            MovementSelectorModel model
            )
        {
            this.view         = view;
            this.moveExecutor = moveExecutor;
            this.model        = model;

            view.Initialize(this);
            view.UpdateView(model);
        }
Ejemplo n.º 3
0
        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);
        }