void spawnPotions(GameTime gameTime) { //spawn timeSinceLastPotionSpawn += (float)gameTime.ElapsedGameTime.TotalSeconds; if (timeSinceLastPotionSpawn >= potionSpawnDelay) { Potion p = new Potion(new Rectangle(0, 0, POTIONWIDTH, POTIONHEIGHT)); do { p.X = rand.Next(p.maxX + 1); p.Y = rand.Next(p.maxY + 1); } while (isaac.IsNear(p, 1f)); timeSinceLastPotionSpawn = 0; } }