Beispiel #1
0
 public SunDrawer(Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4, Game game)
 {
     e      = new BasicEffect(game.GraphicsDevice, null);
     tBack  = game.Content.Load <Texture2D>("sun/sun");
     tFlare = game.Content.Load <Texture2D>("sun/sunglare");
     //sun = new Graphics.Shapes.QuadDrawer(p1 + new Vector3(0.01f, 250, 250), p2 + new Vector3(0.01f, -250, 250), p3 + new Vector3(0.01f, 250, -250), p4 + new Vector3(0.01f, -250, -250),
     //  1, tBack, game.GraphicsDevice);
     glare = new Graphics.Shapes.QuadDrawer(p1 + new Vector3(0.02f, 0, 0), p2 + new Vector3(0.02f, 0, 0), p3 + new Vector3(0.02f, 0, 0), p4 + new Vector3(0.02f, 0, 0),
                                            1, tFlare, game.GraphicsDevice);
     e.EmissiveColor = new Vector3(1, 1, 1);
     e.DiffuseColor  = new Vector3(1, 1, 1);
     e.SpecularColor = new Vector3(1, 1, 1);
     e.SpecularPower = 2f;
 }
Beispiel #2
0
 public SunDrawer(Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4,Game game)
 {
     e = new BasicEffect(game.GraphicsDevice, null);
     tBack = game.Content.Load<Texture2D>("sun/sun");
     tFlare = game.Content.Load<Texture2D>("sun/sunglare");
     //sun = new Graphics.Shapes.QuadDrawer(p1 + new Vector3(0.01f, 250, 250), p2 + new Vector3(0.01f, -250, 250), p3 + new Vector3(0.01f, 250, -250), p4 + new Vector3(0.01f, -250, -250),
       //  1, tBack, game.GraphicsDevice);
     glare = new Graphics.Shapes.QuadDrawer(p1 + new Vector3(0.02f, 0, 0), p2 + new Vector3(0.02f, 0, 0), p3 + new Vector3(0.02f, 0, 0), p4 + new Vector3(0.02f, 0, 0),
         1, tFlare, game.GraphicsDevice);
     e.EmissiveColor = new Vector3(1, 1, 1);
     e.DiffuseColor = new Vector3(1, 1, 1);
     e.SpecularColor = new Vector3(1, 1, 1);
     e.SpecularPower = 2f;
 }