Example #1
0
        public static void collideRepelentAndMonster(RepelentBall b1, MonsterBall b2)
        {
            float newRadius = b1.radius / 2;

            b1.radius = Math.Max(1, newRadius);
        }
Example #2
0
 public static void collideRegularAndRepelent(RegularBall b1, RepelentBall b2)
 {
     b2.color     = b1.color;
     b1.speed.dx *= (-1);
     b1.speed.dy *= (-1);
 }