public void Load(ContentManager Content, GraphicsDevice graphicsDevice)
        {
            Color color = Color.Black;

            animation.LoadConent(Content);
            animation.setEventOnAnimation("Player/Shoot/Shoot", "shoot", 2);
            animation.setDelayBeetwenAnim("Player/Jump/Jump", 100);
            animation.setDelayBeetwenAnim("Player/Shoot/Shoot", 50);
            //animation.setCurrentAnimation("Player/Run/Run");
            base.LoadContent(Content, "idle1");
            Bullet bullet1 = new Bullet();

            bullet1.Load(Content);
            healthBar  = new HealthBar(Content);
            livePoints = healthBar.fullHealth;
            font       = Content.Load <SpriteFont>("healthsFont");
            var colors = new Color[_texture.Width * _texture.Height];

            colors[0] = color;
            colors[1] = color;
            colors[_texture.Width - 1] = color;
            colors[_texture.Width - 2] = color;
            colors[(_texture.Width * _texture.Height) - _texture.Width]     = color;
            colors[(_texture.Width * _texture.Height) - _texture.Width + 1] = color;


            colors[(_texture.Width * _texture.Height) - 1] = color;
            colors[(_texture.Width * _texture.Height) - 2] = color;


            _rectangleTexture = new Texture2D(graphicsDevice, _texture.Width, _texture.Height);
            _rectangleTexture.SetData(colors);
        }
Exemplo n.º 2
0
 public void LoadContent(ContentManager content)
 {
     EnemyTextures.Load(content);
     EnemyBase.setContent(content);
     enemyAnimations.LoadConent(content);
     foreach (EnemyBase enemy in enemiesList)
     {
         enemy.Load(EnemyTextures.idle, enemyAnimations);
     }
 }