public void Init(BallController controller)
        {
            if (ballController == null)
            {
                ballController = controller;
            }

            addedSpeed = 1f;
        }
Пример #2
0
        void InitBallController()
        {
            var goBallController = Instantiate(data.ballControllerPrefab) as GameObject;

            goBallController.transform.parent = world.transform;
            BallController = goBallController.GetComponent <BallController>();

            var sprites = Resources.Load <DataShopItem>("Data/DataShopItem").itemBalls;

            var sprite = GetBallSprite(CurrentGame.CurrentBallSpriteIndex);

            BallController.Init(sprite);
        }
 public void Init(BallController _ballController)
 {
     ballController = _ballController;
     moveDirection  = Vector2.zero;
     endPoint       = Vector2.zero;
 }
Пример #4
0
 //подготовка мячей при запуске игры
 void StartBallCreate()
 {
     AudioManager.Instance.Play(StaticPrm.SOUND_START_GAME);
     BallController.BallPreparation();
 }