コード例 #1
0
        public override GameScene MakeScene()
        {
            //System.Windows.Forms.MessageBox.Show(Name);
            GameScene Menu = new GameScene(Name, Content.Load<Texture2D>(@"Images\Menu"), sprBatch);

            ButtonObject New_game = new ButtonObject(Content.Load<Texture2D>(@"Images\New_game"));
            New_game.Position = new Vector2(676, 200);
            New_game.Pressed += new EventHandler(New_game_Pressed);

            ButtonObject Exit = new ButtonObject(Content.Load<Texture2D>(@"Images\Exit"));
            Exit.Position = new Vector2(356, 3);
            Exit.Pressed += new EventHandler(Exit_Pressed);

            Menu.AddObject(Exit);
            Menu.AddObject(New_game);

            return Menu;
        }