Beispiel #1
0
        private void Awake()
        {
            _levelIndex = AppManager.Instance.AppContext.LevelToPlay;
            _levelInfo  = AppManager.Instance.ConfigService.LevelsConfig.Levels[_levelIndex];

            _pointsPerItem = 0;
            _totalPoints   = 0;

            _ballsToReach       = LevelUtils.GetBallsToReach(_levelInfo);
            _ballsToReachStatus = new bool[_ballsToReach.Count];

            _roadPath = new VertexPath(new BezierPath(_levelInfo.Road.PointsVector3));

            var roadManager = roadGo.GetComponent <RoadManager>();

            roadManager.RenderRoad(_roadPath, _levelInfo.Road);

            _ballManager = ballGo.GetComponent <BallManager>();
            _ballManager.Init(_roadPath, _levelInfo.Ball, OnBallCollision, OnBallOvercome, OnEndPortalReached);
        }