bool isaacIsNearFireball(float factor) { foreach (Fireball fireball in Fireball.Fireballs) { if (isaac.IsNear(fireball, factor)) { return(true); } } return(false); }
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); }