示例#1
0
文件: Program.cs 项目: ttocs7/menus
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
示例#2
0
文件: Menu.cs 项目: ttocs7/menus
        public Menu(Game1 game, List<string> items)
        {
            fadetime = TimeSpan.FromSeconds(0.2);

            this.game = game;

            spriteBatch = new SpriteBatch(game.GraphicsDevice);
            blanksprite = game.Content.Load<Texture2D>("blanksprite");
            menusprite = game.Content.Load<Texture2D>("menusprite");
            font = game.Content.Load<SpriteFont>("SpriteFont1");

            input = new Input();

            this.items = new List<string>();
            this.items.AddRange(items);
            listCount = items.Count() - 1;
        }
示例#3
0
文件: Menu.cs 项目: ttocs7/menus
        public Menu(Game1 game)
        {
            fadetime = TimeSpan.FromSeconds(0.2);

            this.game = game;

            spriteBatch = new SpriteBatch(game.GraphicsDevice);
            blanksprite = game.Content.Load<Texture2D>("blanksprite");
            menusprite = game.Content.Load<Texture2D>("menusprite");
            font = game.Content.Load<SpriteFont>("SpriteFont1");

            input = new Input();

            items = new List<string>();
            this.items.Add("PAUSED");
            this.items.Add("Continue Game");
            this.items.Add("Exit Game");

            listCount = 2;
        }