예제 #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;
        }