Beispiel #1
0
        public MenuScene(Game game, GraphicsDeviceManager manager)
            : base(game, manager)
        {
            isHelp = false;
            count  = false;

            graphics          = manager;
            spriteBatch       = new SpriteBatch(graphics.GraphicsDevice);
            backgroundTexture = game.Content.Load <Texture2D>("image\\최종배경");

            viewportRect = new Rectangle(0, 0,
                                         graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height);

            button1   = game.Content.Load <Texture2D>("image\\시작버튼");
            button2   = game.Content.Load <Texture2D>("image\\게임방법버튼");
            howtoplay = game.Content.Load <Texture2D>("image\\게임방법");
            exit      = game.Content.Load <Texture2D>("image\\창닫기버튼");
            count3    = game.Content.Load <Texture2D>("image\\3");
            count2    = game.Content.Load <Texture2D>("image\\2");
            count1    = game.Content.Load <Texture2D>("image\\1");
            gamestart = game.Content.Load <Texture2D>("image\\게임시작");

            font = game.Content.Load <SpriteFont>("Fonts\\GameFont");

            Texture2D      texture  = game.Content.Load <Texture2D>("selection");
            List <Textbox> textboxs = new List <Textbox>();
            SpriteFont     textFont = game.Content.Load <SpriteFont>("font");
            Textbox        textbox  = new Textbox(new Rectangle(980, 550, 150, 70), textFont, "", 5, null, null, texture);

            textboxs.Add(textbox);
            textbox = new Textbox(new Rectangle(980, 680, 150, 70), textFont, "", 5, null, null, texture);
            textboxs.Add(textbox);
            textboxHandler = new TextboxHandler(textboxs, Vector2.Zero);
        }
        public OptionScene(Game game, GraphicsDeviceManager manager)
            : base(game, manager)
        {
            this.graphics    = manager;
            this.spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

            bg = new Texture2D(graphics.GraphicsDevice, 100, 100);
            bg = game.Content.Load <Texture2D>("option");



            rankingfont = game.Content.Load <SpriteFont>("Rankingfont");



            Texture2D      texture  = game.Content.Load <Texture2D>("selection");
            List <Textbox> textboxs = new List <Textbox>();

            font = game.Content.Load <SpriteFont>("font");

            Textbox textbox = new Textbox(new Rectangle(450, 120, 150, 70), font, "", 5, null, null, texture);

            textboxs.Add(textbox);
            textbox = new Textbox(new Rectangle(700, 120, 150, 70), font, "", 5, null, null, texture);
            textboxs.Add(textbox);
            textboxHandler = new TextboxHandler(textboxs, Vector2.Zero);
        }