Ejemplo n.º 1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            String strConn = "Server=ec2-52-78-136-135.ap-northeast-2.compute.amazonaws.com;Database=breads;Uid=root;Pwd=taek522!;";

            conn = new MySqlConnection(strConn);

            conn.Open();



            isHelp = false;
            count  = false;

            gScene = new GameScene(this, graphics);
            mScene = new MenuScene(this, graphics);
            oScene = new OptionScene(this, graphics);

            player1.CursorType = (int)CURSOR_TYPE.HAND;

            this.currentScene  = Scenes.uninitiate;
            Scene.targetScreen = Scenes.MenuScene;


            posMouse[0]  = new Vector2(14, 137);
            posMouse[1]  = new Vector2(70, 100);
            posMouse[2]  = new Vector2(123, 3);
            Game1.sprite = Content.Load <Texture2D>("hand");
            base.Initialize();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            isHelp = false;
            count  = false;

            gScene             = new GameScene(this, graphics);
            mScene             = new MenuScene(this, graphics);
            player1.CursorType = (int)CURSOR_TYPE.HAND;

            this.currentScene  = Scenes.uninitiate;
            Scene.targetScreen = Scenes.MenuScene;


            posMouse[0]  = new Vector2(14, 137);
            posMouse[1]  = new Vector2(70, 100);
            posMouse[2]  = new Vector2(123, 3);
            Game1.sprite = Content.Load <Texture2D>("hand");
            base.Initialize();
        }
Ejemplo n.º 3
0
        private void UpdateScreen()
        {
            if (this.currentScene != Scene.targetScreen)
            {
                switch (Scene.targetScreen)
                {
                case Scenes.GameScene:
                    this.scene = gScene;

                    mScene = new MenuScene(this, graphics);
                    break;

                case Scenes.MenuScene:
                    this.scene = mScene;
                    oScene     = new OptionScene(this, graphics);
                    gScene     = new GameScene(this, graphics);
                    break;

                case Scenes.OptionScene:
                    this.scene = oScene;
                    break;
                }
            }
        }