Pac Man pellet remov
public text v1 · immutablefor(int i = pellets.Count - 1; i > -1; i--)
{
if( pacMan.CollidesWith(pellets[i]))
{
pacMan.GivePoints(10);
sprMan.RemoveSprite(pellets[i]);
}
}for(int i = pellets.Count - 1; i > -1; i--)
{
if( pacMan.CollidesWith(pellets[i]))
{
pacMan.GivePoints(10);
sprMan.RemoveSprite(pellets[i]);
}
}