예제 #1
0
파일: World.cs 프로젝트: pema99/RayOptics
 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);
     }
 }
예제 #2
0
파일: World.cs 프로젝트: pema99/RayOptics
        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;
            }
        }
예제 #3
0
 public GlassPane(Vector A, Vector B, GlassPolygon Parent)
     : base(A, B)
 {
     this.Parent = Parent;
 }