Exemple #1
0
 bool isaacIsNearFireball(float factor)
 {
     foreach (Fireball fireball in Fireball.Fireballs)
     {
         if (isaac.IsNear(fireball, factor))
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #2
0
        bool tryToSpawnIsaac(int index, float factor)
        {
            for (int i = 0; i < isaacSpawnPoints.Count; i++, index++)
            {
                isaac.X = (int)isaacSpawnPoints[index % isaacSpawnPoints.Count].X;
                isaac.Y = (int)isaacSpawnPoints[index % isaacSpawnPoints.Count].Y;

                if (isaac.IsNear(bill, factor))
                {
                    continue;
                }
                if (isaacIsNearCan(factor))
                {
                    continue;
                }
                return(true);
            }
            return(false);
        }