public static void Draw(SpriteBatch spriteBatch) { foreach (SingleRay Ray in SingleRays) { Ray.Draw(spriteBatch); } foreach (Mirror Mirror in Mirrors) { Mirror.Draw(spriteBatch); } foreach (GlassPolygon GlassPolygon in GlassPolygons) { GlassPolygon.Draw(spriteBatch); } }
public static void Update(GameTime gameTime) { foreach (SingleRay Ray in SingleRays) { Ray.Update(gameTime); } foreach (Mirror Mirror in Mirrors) { Mirror.Update(gameTime); } foreach (GlassPolygon GlassPolygon in GlassPolygons) { GlassPolygon.Update(gameTime); } if (Keyboard.GetState().IsKeyDown(Keys.Right)) { SingleRays[0].Angle -= 0.01; } if (Keyboard.GetState().IsKeyDown(Keys.Left)) { SingleRays[0].Angle += 0.01; } }
public GlassPane(Vector A, Vector B, GlassPolygon Parent) : base(A, B) { this.Parent = Parent; }