Esempio n. 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>();
    }
Esempio n. 2
0
    void Update()
    {
        stopManager();
        if (_ballPresenter.isFalling())
        {
            _cylinderManager.countFellDowns();
            _ballPresenter.resetPosition();
        }

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