Ejemplo n.º 1
0
        public override void LoadContent(ContentManager ContentMgr, GraphicsDeviceManager graphics)
        {
            //spriteBatch = new SpriteBatch(GraphicsDevice);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
            btnPlay                    = new mButton(ContentMgr.Load <Texture2D>("Button"), graphics.GraphicsDevice);
            btnOp                      = new mButton(ContentMgr.Load <Texture2D>("OPBtn"), graphics.GraphicsDevice);
            btnLoad                    = new mButton(ContentMgr.Load <Texture2D>("BtnLoad"), graphics.GraphicsDevice);
            btnExit                    = new mButton(ContentMgr.Load <Texture2D>("BtnExit"), graphics.GraphicsDevice);
            btnTutorial                = new mButton(ContentMgr.Load <Texture2D>("TutorialBtn"), graphics.GraphicsDevice);
            btnPlay.ButtonClicked     += HandleButtonClicked;
            btnOp.ButtonClicked       += HandleButtonClicked;
            btnLoad.ButtonClicked     += HandleButtonClicked;
            btnExit.ButtonClicked     += HandleButtonClicked;
            btnTutorial.ButtonClicked += HandleButtonClicked;
            btnPlay.setPosition(new Vector2(350, 300));
            btnOp.setPosition(new Vector2(350, 300 + btnOp.size.Y * 2));
            btnLoad.setPosition(new Vector2(350, 300 + btnLoad.size.Y * 4));
            btnExit.setPosition(new Vector2(350, 300 + btnLoad.size.Y * 8));
            btnTutorial.setPosition(new Vector2(350, 300 + btnTutorial.size.Y * -8));
            background = ContentMgr.Load <Texture2D>("TitleScreenBg");
            btnSound   = ContentMgr.Load <SoundEffect>("ButtonClick");

            //  this.IsMouseVisible = true;
        }
Ejemplo n.º 2
0
 public override void LoadContent(ContentManager ContentMgr, GraphicsDeviceManager graphics)
 {
     //spriteBatch = new SpriteBatch(GraphicsDevice);
     graphics.PreferredBackBufferWidth  = screenWidth;
     graphics.PreferredBackBufferHeight = screenHeight;
     btnSave = new mButton(ContentMgr.Load <Texture2D>("BtnSave"), graphics.GraphicsDevice);
     btnLoad = new mButton(ContentMgr.Load <Texture2D>("BtnLoad"), graphics.GraphicsDevice);
     btnBack = new mButton(ContentMgr.Load <Texture2D>("BtnBack"), graphics.GraphicsDevice);
     btnSave.ButtonClicked += HandleButtonClicked;
     btnLoad.ButtonClicked += HandleButtonClicked;
     btnBack.ButtonClicked += HandleButtonClicked;
     btnSave.setPosition(new Vector2(350, 100));
     btnLoad.setPosition(new Vector2(350, 200 + btnLoad.size.Y * 2));
     btnBack.setPosition(new Vector2(350, 300 + btnBack.size.Y * 7));
     background = ContentMgr.Load <Texture2D>("CellRoom");
 }
Ejemplo n.º 3
0
 public override void LoadContent(ContentManager ContentMgr, GraphicsDeviceManager graphics)
 {
     //spriteBatch = new SpriteBatch(GraphicsDevice);
     graphics.PreferredBackBufferWidth  = screenWidth;
     graphics.PreferredBackBufferHeight = screenHeight;
     btnLoad2 = new mButton(ContentMgr.Load <Texture2D>("BtnLoad"), graphics.GraphicsDevice);
     btnLoad1 = new mButton(ContentMgr.Load <Texture2D>("BtnLoad"), graphics.GraphicsDevice);
     btnBack  = new mButton(ContentMgr.Load <Texture2D>("BtnBack"), graphics.GraphicsDevice);
     btnLoad2.ButtonClicked += HandleButtonClicked;
     btnLoad1.ButtonClicked += HandleButtonClicked;
     btnBack.ButtonClicked  += HandleButtonClicked;
     btnLoad2.setPosition(new Vector2(350, 300));
     btnLoad1.setPosition(new Vector2(350, 300 + btnLoad1.size.Y * 2));
     btnBack.setPosition(new Vector2(350, 300 + btnBack.size.Y * 9));
     //this.IsMouseVisible = true;
 }
Ejemplo n.º 4
0
 public override void LoadContent(ContentManager ContentMgr, GraphicsDeviceManager graphics)
 {
     //spriteBatch = new SpriteBatch(GraphicsDevice);
     graphics.PreferredBackBufferWidth  = screenWidth;
     graphics.PreferredBackBufferHeight = screenHeight;
     btnResume = new mButton(ContentMgr.Load <Texture2D>("Button"), graphics.GraphicsDevice);
     btnOp     = new mButton(ContentMgr.Load <Texture2D>("OPbtn"), graphics.GraphicsDevice);
     btnExit   = new mButton(ContentMgr.Load <Texture2D>("BtnExit"), graphics.GraphicsDevice);
     btnResume.ButtonClicked += HandleButtonClicked;
     btnOp.ButtonClicked     += HandleButtonClicked;
     btnExit.ButtonClicked   += HandleButtonClicked;
     btnResume.setPosition(new Vector2(350, 300));
     btnOp.setPosition(new Vector2(350, 400 + btnOp.size.Y * 2));
     btnExit.setPosition(new Vector2(359, 500 + btnExit.size.Y * 2));
     background = ContentMgr.Load <Texture2D>("PauseScreen");
     btnSound   = ContentMgr.Load <SoundEffect>("ButtonClick");
 }
Ejemplo n.º 5
0
 public override void LoadContent(ContentManager ContentMgr, GraphicsDeviceManager graphics)
 {
     backGround   = ContentMgr.Load <Texture2D>("ShopGround");
     potionBottle = ContentMgr.Load <Texture2D>("Bottle");
     btnBack      = new mButton(ContentMgr.Load <Texture2D>("BtnBack"), graphics.GraphicsDevice);
     btnBuyP      = new mButton(ContentMgr.Load <Texture2D>("BtnBuy"), graphics.GraphicsDevice);
     btnBuyF      = new mButton(ContentMgr.Load <Texture2D>("BtnBuy"), graphics.GraphicsDevice);
     brassKnuckle = ContentMgr.Load <Texture2D>("BrassKnuckles");
     //potionBottle.setPosition(new Vector2(350, 300));
     btnBuyP.setPosition(new Vector2(350, 300 + btnBuyP.size.Y * 8));
     btnBuyF.setPosition(new Vector2(450, 300 + btnBuyF.size.Y * 8));
     ////potionBottle.ButtonClicked += HandleButtonClicked;
     shopText = ContentMgr.Load <SpriteFont>("TutorialHelp");
     btnBack.ButtonClicked += HandleButtonClicked;
     btnBuyP.ButtonClicked += HandleButtonClicked;
     btnBuyF.ButtonClicked += HandleButtonClicked;
     ReadSave();
 }
Ejemplo n.º 6
0
        public override void LoadContent(ContentManager ContentMgr, GraphicsDeviceManager graphics)
        {
            //All of our animation and buttins are stored into LoadContent
            fightButton = new mButton(ContentMgr.Load <Texture2D>("BtnFight"), graphics.GraphicsDevice, (o, e) => selected = fightButton);

            itemButton = new mButton(ContentMgr.Load <Texture2D>("BtnItem"), graphics.GraphicsDevice, (o, e) => selected = itemButton);

            specialButton = new mButton(ContentMgr.Load <Texture2D>("BtnSpecial"), graphics.GraphicsDevice, (o, e) => selected = specialButton);

            FleeButton = new mButton(ContentMgr.Load <Texture2D>("btnLoad"), graphics.GraphicsDevice, (o, e) => selected = FleeButton);

            battleEnemy   = ContentMgr.Load <Texture2D>("BattlePen");
            battleEnemy2  = ContentMgr.Load <Texture2D>("BattleCen");
            fistAnimation = ContentMgr.Load <Texture2D>("FistAnimation");
            heartAnime    = ContentMgr.Load <Texture2D>("Heart");
            fireball      = ContentMgr.Load <Texture2D>("Fireball");
            brassKnuckle  = ContentMgr.Load <Texture2D>("BrassKnuckles");

            enemyHealthFont              = ContentMgr.Load <SpriteFont>("HealthFont");
            HealthFont                   = ContentMgr.Load <SpriteFont>("HealthFont");
            fightButton.ButtonClicked   += HandleButtonClicked;
            itemButton.ButtonClicked    += HandleButtonClicked;
            specialButton.ButtonClicked += HandleButtonClicked;
            fightButton.setPosition(new Vector2(80, 550));
            itemButton.setPosition(new Vector2(80, 650));
            specialButton.setPosition(new Vector2(450, 630));
            background   = ContentMgr.Load <Texture2D>("BattleScreen");
            tutorialHelp = ContentMgr.Load <SpriteFont>("TutorialHelp");
            song         = ContentMgr.Load <Song>("BattleMusic");
            MediaPlayer.Play(song);
            MediaPlayer.IsRepeating = true;
            punchSound   = ContentMgr.Load <SoundEffect>("Punching");
            healingSound = ContentMgr.Load <SoundEffect>("Healing");
            ReadSave();

            base.LoadContent(ContentMgr, graphics);
        }