Ejemplo n.º 1
0
        private void ExecuteAdditionalEffect(BrickType type)
        {
            switch (type)
            {
            case BrickType.ThreeBalls:
            {
                IPad pad = padManager.GetFirst();

                IBall ball1 = new Ball(randomGenerator);
                ball1.SetSize(15, 15);
                SetBallStartPosition(pad, ball1);
                ballManager.Add(ball1);

                IBall ball2 = new Ball(randomGenerator);
                ball2.SetSize(15, 15);
                SetBallStartPosition(pad, ball2);
                ballManager.Add(ball2);
                break;
            }

            case BrickType.DestroyerBall:
            {
                foreach (IBall ball in ballManager)
                {
                    tailManager.Add(ball);
                }
                break;
            }

            default:
                break;
            }
        }
Ejemplo n.º 2
0
        public bool action(IBall ball)
        {
            IPad pad = padManager.GetFirst();

            padManager.SetBallStartPosition(pad, ball);
            return(true);
        }
Ejemplo n.º 3
0
 public bool action(IBall ball)
 {
     if (!game.ShouldGo)
     {
         IPad pad = padManager.GetFirst();
         game.SetBallStartPosition(pad, ball);
     }
     return(true);
 }