public void Awake() { _ballManager = GetComponent <BallManager>(); _moveTolerance = 0.1f; _mouseMoveFactor = 0.005f; _touchMoveFactor = 0.008f; }
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); }
private void Awake() { _rayCastLayerMask = 1 << 9; _rayCastMaxDistance = 3f; _ballManager = GetComponent <BallManager>(); }