/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (TVSGame game = new TVSGame()) { game.Run(); } }
public TVSGame() { graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferWidth = Resolution.X; graphics.PreferredBackBufferHeight = Resolution.Y; graphics.IsFullScreen = Config.IsFullscreen; Content.RootDirectory = "Content"; KeyBinding.Initialize(); Instance = this; }
public Light(Vector2 PlayerPos) { MyPosition = Vector2.Zero; Game = TVSGame.Instance; sb = new SpriteBatch(Game.GraphicsDevice); LightsFX = new LightsFX(Loader.LoadEffect("resolveShadowsEffect"), Loader.LoadEffect("reductionEffect"), Loader.LoadEffect("2xMultiBlend")); ShadowMapResolver = new ShadowMapResolver(Game.GraphicsDevice, LightsFX, 128); LightSource = new LightSource(Game.graphics, Config.PlayerLightRadius, LightAreaQuality.High, Config.PlayerLightColor); Bullets = new List <LightBullet>(); ShadowMap = new ShadowCasterMap(PrecisionSettings.VeryHigh, Game.graphics, sb); LightPosition = new Vector2(Game.GraphicsDevice.Viewport.Width / 2, Game.GraphicsDevice.Viewport.Height / 2); //PlayerPos; ScreenLights = new RenderTarget2D(Game.GraphicsDevice, Game.GraphicsDevice.Viewport.Width, Game.GraphicsDevice.Viewport.Height); ScreenGround = new RenderTarget2D(Game.GraphicsDevice, Game.GraphicsDevice.Viewport.Width, Game.GraphicsDevice.Viewport.Height); ShadowMapResolverBullets = new ShadowMapResolver(Game.GraphicsDevice, LightsFX, 128); }