/// <summary> /// точка входа /// </summary> static void Main(string[] args) { using (BaseGame game = new BaseGame()) { game.Run(); } }
public drvMenu(BaseGame baseGame ,GraphicsDevice graphicsDevice, IServiceProvider serviceProvider, Rectangle ScreenRectangle, Rectangle GameScreenRectangle) { this.baseGame = baseGame; this.graphicsDevice = graphicsDevice; this.ScreenRectangle = ScreenRectangle; this.GameScreenRectangle = GameScreenRectangle; this.serviceProvider = serviceProvider; content = new ContentManager(serviceProvider, "Content"); MenuScreenRender = new RenderTarget2D(graphicsDevice, GameScreenRectangle.Width, GameScreenRectangle.Height); BackgroundRender = new RenderTarget2D(graphicsDevice, ScreenRectangle.Width, ScreenRectangle.Height); BaseRender = new RenderTarget2D(graphicsDevice, ScreenRectangle.Width, ScreenRectangle.Height); FontMenu = content.Load<SpriteFont>("Fonts/MenuFont"); tstTexture = content.Load<Texture2D>("tstTexture"); BaseMenuBgr = content.Load<Texture2D>("basemenu"); RedButton = content.Load<Texture2D>("RedButton"); RedButtonCursor = content.Load<Texture2D>("RedButtonCursor"); ButtonCursor = content.Load<Texture2D>("ButtonCursor"); MenuScreenCoord = new Vector2((ScreenRectangle.Width - GameScreenRectangle.Width) / 2, (ScreenRectangle.Height - GameScreenRectangle.Height) / 2); }
public Options(BaseGame baseGame, GraphicsDevice graphicsDevice, IServiceProvider serviceProvider, Rectangle ScreenRectangle, Rectangle GameScreenRectangle) { this.baseGame = baseGame; this.graphicsDevice = graphicsDevice; this.ScreenRectangle = ScreenRectangle; this.GameScreenRectangle = GameScreenRectangle; content = new ContentManager(serviceProvider, "Content"); OptionsRender = new RenderTarget2D(graphicsDevice, GameScreenRectangle.Width, GameScreenRectangle.Height); BackgroundRender = new RenderTarget2D(graphicsDevice, ScreenRectangle.Width, ScreenRectangle.Height); //FontMenu = content.Load<SpriteFont>("Fonts/MenuFont"); //tstTexture = content.Load<Texture2D>("tstTexture"); OptionsMenuBgr = content.Load<Texture2D>("Options"); //RedButton = content.Load<Texture2D>("RedButton"); //RedButtonCursor = content.Load<Texture2D>("RedButtonCursor"); //ButtonCursor = content.Load<Texture2D>("ButtonCursor"); blurEffect = content.Load<Effect>("Effect"); ScreenCoord = new Vector2((ScreenRectangle.Width - GameScreenRectangle.Width) / 2, ScreenRectangle.Bottom); }