Ejemplo n.º 1
0
 public static void LoadTextures(ContentManager content, GraphicsDevice graphicsDevice)
 {
     swordTexture      = content.Load <Texture2D>("sword");
     projectileTexture = content.Load <Texture2D>("blue-ball");
     megamanTexture    = content.Load <Texture2D>("megaman");
     Inventory.LoadTextures(content);
     Inventory.CreateTextures(graphicsDevice);
     EquipmentMenu.CreateTextures(graphicsDevice);
     PlayerInfoBar.CreateTextures(graphicsDevice);
     PlayerInfoBar.LoadTextures(content);
     InfoBox.CreateTextures(graphicsDevice);
 }
Ejemplo n.º 2
0
        public Player(Vector2 location, int screenWidth, int screenHeight)
        {
            this.location     = location;
            this.screenWidth  = screenWidth;
            this.screenHeight = screenHeight;

            inventory     = new PlayerInventory(this, screenWidth, screenHeight);
            equipmentMenu = new EquipmentMenu(this);
            hitBox        = new Rectangle((int)location.X, (int)location.Y, width, height);
            swordHitBox   = new Rectangle((int)location.X + width, (int)location.Y, swordOffset, height);


            swordOffset = 30;
            height      = 100;
            width       = 100;
            maxHealth   = 100;
            health      = maxHealth;
            maxMana     = 50;
            mana        = maxMana;
            xpToLevel   = 100;
            xp          = 0;
        }