Esempio n. 1
0
 public void swallow(RepellentBall ball)
 {
     //Console.WriteLine("Reg vs. Rep");
     ball.color         = BallUtils.combineColors(ball, this);
     this.direction.dx *= -1;
     this.direction.dy *= -1;
 }
Esempio n. 2
0
 public void swallow(RegularBall ball)
 {
     ball.isDone = true;
     Console.WriteLine("Terminated " + ball.ballType + " Ball [ " + ball.id + "]");
     this.color   = BallUtils.combineColors(this, ball);
     this.radius += ball.radius;
 }
Esempio n. 3
0
 public void swallow(MonsterBall ball)
 {
     //Console.WriteLine("R vs. M");
     this.isDone = true;
     Console.WriteLine("Terminated " + this.ballType + " Ball [ " + this.id + "]");
     ball.color   = BallUtils.combineColors(ball, this);
     ball.radius += this.radius;
 }
Esempio n. 4
0
        public void swallow(RegularBall ball)
        {
            //Console.WriteLine("R vs. R");
            RegularBall eater, eaten;

            if (this.radius > ball.radius)
            {
                eater = this;
                eaten = ball;
            }
            else
            {
                eater = ball;
                eaten = this;
            }

            eaten.isDone = true;
            Console.WriteLine("Terminated " + eaten.ballType + " Ball [ " + eaten.id + "]");
            eater.color   = BallUtils.combineColors(eater, eaten);
            eater.radius += eaten.radius;
        }
Esempio n. 5
0
 public void swallow(RepellentBall ball)
 {
     ball.color = BallUtils.combineColors(ball, this);
     this.color = BallUtils.combineColors(this, ball);
 }
Esempio n. 6
0
 public void swallow(RegularBall ball)
 {
     this.color         = BallUtils.combineColors(this, ball);
     ball.direction.dx *= -1;
     ball.direction.dy *= -1;
 }