Exemple #1
0
        public override List <Ball> SplitBall(Point p)
        {
            List <Ball> NewBalls = new List <Ball>();
            Ball        one      = new RedBall(new Point(p.X + 10, p.Y - 10), this.Width, this.Height);

            one.InvertDirection();
            Ball two = new RedBall(new Point(p.X + 10, p.Y - 10), this.Width, this.Height);

            NewBalls.Add(one);
            NewBalls.Add(two);
            return(NewBalls);
        }
Exemple #2
0
        //Metod koj generira topcinja za dadenoto nivo

        public override void GenerateBalls()
        {
            Ball ball = new GreenBall(new Point((8 * Width) / 13, (2 * Height) / 12), Width, Height);

            AddBall(ball);
            ball = new BlueBall(new Point((8 * Width) / 13, (3 * Height) / 12), Width, Height);
            AddBall(ball);
            ball = new GreenBall(new Point((8 * Width) / 13, (4 * Height) / 12), Width, Height);
            AddBall(ball);
            ball = new BlueBall(new Point((8 * Width) / 13, (5 * Height) / 12), Width, Height);
            AddBall(ball);
            ball = new GreenBall(new Point((8 * Width) / 13, (6 * Height) / 12), Width, Height);
            AddBall(ball);
            ball = new RedBall(new Point((8 * Width) / 13, (7 * Height) / 12), Width, Height);
            AddBall(ball);
        }