Esempio n. 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);
        }
Esempio n. 2
0
 public virtual void Eat(Player player, CircleObject whatToEat)
 {
     player.SetRadius(player.GetRadius() + whatToEat.GetRadius() - 4);
 }
Esempio n. 3
0
 public override void Eat(Player player, CircleObject whatToEat)
 {
     player.SetRadius(player.GetRadius() + whatToEat.GetRadius() - 3f);
 }