private void AddPoloski(int nPolos) { for (int i = 0; i < nPolos; i++) { ori = random.Next(0, 9); int x = random.Next(this.Width - 200); int y = random.Next(this.Height - 200); if (ori < 5) { Polosa p = new Polosa(x, y, wPolos, hPolos); p.set_color(random.Next(0, 255), random.Next(0, 255), random.Next(0, 255)); pList.Add(p); } else { Polosa p = new Polosa(x, y, hPolos, wPolos); p.set_color(random.Next(0, 255), random.Next(0, 255), random.Next(0, 255)); pList.Add(p); } } }
internal bool Overlap(Polosa p) { return(r.IntersectsWith(p.r)); }