Example #1
0
    protected void Awake()
    {
        var model      = new ClickerModel();
        var controller = new ClickerController(model);

        m_View = new ClickerView(model, controller);
    }
Example #2
0
        private void Awake()
        {
            GetCore     = this;
            GetMB       = this;
            GetProgress = new GameProgress();
            mainButton.DelayBeforeAutoClick = AutoClickCountDown;

            #region CreateControllers

            clickerController = new ClickerController(mainButton);

            #endregion
        }
Example #3
0
        private void Awake()
        {
            GetCore     = this;
            GetMB       = this;
            GetProgress = new GameProgress();
            mainButton.DelayBeforeAutoClick = Constants.DELAY_BEFOR_AUTO_CLICK;

            #region CreateControllers

            clickerController = new ClickerController(mainButton);
            uiController      = new UIController(inGameUI, clickerController);

            #endregion
        }
Example #4
0
    void Start()
    {
        clicker = GameObject.Find("GameController").GetComponent <ClickerController>();
        switch (invaderState)
        {
        case LiftInvaderStates.WalkTo:
            currentState = walkToState;
            break;

        case LiftInvaderStates.OpenLift:
            currentState = openLiftState;
            break;

        default:
            break;
        }
    }
Example #5
0
    void Start()
    {
        instance = this;

        if (depletionRates.Length != floors)
        {
            Debug.LogError("Floor amount does not match with depletion rates.");
        }

        SetFloorText(_currentFloor);

        _currentState         = PlayerState.Active;
        _currentHealth        = startHealth;
        healthSlider.minValue = 0;
        healthSlider.maxValue = target;

        _leftDoorStart       = leftDoor.transform.position;
        _leftDoorShortStart  = leftDoorShort.transform.position;
        _rightDoorStart      = rightDoor.transform.position;
        _rightDoorShortStart = rightDoorShort.transform.position;

        AdjustHealthSlider();
    }
Example #6
0
 public ClickerView(ClickerModel model, ClickerController controller)
 {
     OnScoreUpdated(model.Score);
     model.OnScoreUpdated += OnScoreUpdated;
     m_Controller          = controller;
 }