Exemplo n.º 1
0
        private Ball CreateBall(Vector2 pos, BallType ballType, BallColor ballColor)
        {
            GameObject ballObject = BallsPool.FastInstantiate(pos, Quaternion.identity, transform);
            Ball       ball       = ballObject.GetComponent <Ball>();

            ball.Init(false, ballType, GameData.BallStyle, ballColor, true);
            return(ball);
        }
Exemplo n.º 2
0
        private Ball createGunBall(Vector2 pos, BallColor ballColor)
        {
            GameObject ballObject = BallsPool.FastInstantiate(pos, Quaternion.identity, gun.transform);

            ballObject.transform.localScale = Vector3.one;
            Ball ball = ballObject.GetComponent <Ball>();

            ball.Init(true, BallType.Simple, GameData.BallStyle, ballColor);
            return(ball);
        }