public void CastOn(PixelBody wall, MultipixelObject obsticle) { Body.rays.Clear(); GetBody(wall, obsticle); Body.rays.ForEach(r => r.Draw()); source.Draw(); }
private void GetBody(PixelBody wallBody, MultipixelObject obsticle) { foreach (Pixel wall in wallBody.Pixels) { LightRay ray = new LightRay(source, wall, obsticle, Shape, Color); Body.rays.Add(ray); } }