Example #1
0
    void Start()
    {
        GameObject ball = GameObject.Find("Ball");

        _ballModel.setup(ball);
        _ballPresenter = ball.GetComponent <BallPresenter>();
        _ballPresenter.setup(_ballModel);
        _cylinderManager = GameObject.Find("Cylinders").GetComponent <CylinderManager>();
    }
Example #2
0
    void Update()
    {
        stopManager();
        if (_ballPresenter.isFalling())
        {
            _cylinderManager.countFellDowns();
            _ballPresenter.resetPosition();
        }

        if (_cylinderManager.isFinish())
        {
            GameObject cv = Instantiate(gameConfig.cylinderPrefab);
            _cylinderManager = cv.GetComponent <CylinderManager>();
        }
    }