Beispiel #1
0
        public static bool CheckForIntersect(CircleObject firstCircle, CircleObject secondCircle)     //Ricochets first circle
        {
            double distanceBetweenRadiuses = VectorLength(secondCircle.GetCenter(), firstCircle.GetCenter());;

            if (distanceBetweenRadiuses <= firstCircle.GetRadius() + secondCircle.GetRadius() / 2)
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
 public virtual void Eat(Player player, CircleObject whatToEat)
 {
     player.SetRadius(player.GetRadius() + whatToEat.GetRadius() - 4);
 }
Beispiel #3
0
 public override void Eat(Player player, CircleObject whatToEat)
 {
     player.SetRadius(player.GetRadius() + whatToEat.GetRadius() - 3f);
 }