static public bool Zellagui_barreMouvante_mur(BarreMouvante bar, List<Rectangle> list_mur, int gravity) // detection des collisions barre mouvantes / mur { for (int i = 0; i < list_mur.Count; i++) if (new Rectangle((int)bar.position.X + gravity * bar.VitesseBar / 2, (int)bar.position.Y, bar.Width, bar.Height).Intersects(list_mur[i])) // right return true; return false; }
static public bool Zellagui_barreMouvante_mur(BarreMouvante bar, List <Rectangle> list_mur, int gravity) // detection des collisions barre mouvantes / mur { for (int i = 0; i < list_mur.Count; i++) { if (new Rectangle((int)bar.position.X + gravity * bar.VitesseBar / 2, (int)bar.position.Y, bar.Width, bar.Height).Intersects(list_mur[i])) // right { return(true); } } return(false); }