示例#1
0
文件: Program.cs 项目: saniainf/tanki
 /// <summary>
 /// точка входа
 /// </summary>
 static void Main(string[] args)
 {
     using (BaseGame game = new BaseGame())
     {
         game.Run();
     }
 }
示例#2
0
文件: drvMenu.cs 项目: saniainf/tanki
        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);
        }
示例#3
0
文件: Options.cs 项目: saniainf/tanki
        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);
        }