Esempio n. 1
0
        public void LoadContent(ContentManager content)
        {
            idleAnimation = new Animation(content.Load<Texture2D>(Constants.TurretShieldSpritesheet), 0, 70, 70, 0, 0, 100, false, true);
            hitAnimation = new Animation(content.Load<Texture2D>(Constants.TurretShieldSpritesheet), 1, 1, 1, 1, 1, 100, false, false);

            currentAnimation = idleAnimation;
        }
Esempio n. 2
0
        public void LoadContent(ContentManager content)
        {
            idleAnimation = new Animation(content.Load<Texture2D>(Constants.TurretMainBarrelSpritesheet), 0, 75, 20, 0, 0, 100, false, true);
            shootingAnimation = new Animation(content.Load<Texture2D>(Constants.TurretMainBarrelSpritesheet), 1, 1, 1, 1, 1, 100, false, false);

            currentAnimation = idleAnimation;

            this.Origin = new Vector2(0, currentAnimation.FrameHeight / 2);
        }
Esempio n. 3
0
        /// <summary>
        /// Random
        /// </summary>
        public GroundClutter(Texture2D texture, Constants.ClutterType type)
        {
            random = new Random();
            switch (type)
            {
                case Constants.ClutterType.Bush:
                    currentAnimation = new Animation(texture, 0, 48, 48, 0, 0, 100, false, true);
                    break;
                case Constants.ClutterType.Rock:
                    currentAnimation = new Animation(texture, 0, 32, 32, 0, 0, 100, false, true);
                    break;
            }

            this.Position = new Vector2(random.Next(-200, 800), random.Next(-200, 800));

            currentAnimation.Animate(new GameTime());
        }
Esempio n. 4
0
 public void LoadContent(ContentManager content)
 {
     currentAnimation = new Animation(content.Load<Texture2D>(Constants.TurretBodySpritesheet), 0, 75, 66, 0, 0, 100, false, true);
     this.Origin = currentAnimation.Origin;
 }
Esempio n. 5
0
 private void Initialize()
 {
     switch (projectileType)
     {
         case Constants.ProjectileType.PlasmaBall:
             currentAnimation = new Animation(spriteSheet, 0, 15, 15, 0, 0, 100, false, true);
             TangentialVelocity = 50f;
             Damage = 10;
             MaxPenetrations = 2;
             PenetrationDamageReduction = 5;
             break;
     }
 }
Esempio n. 6
0
        private void InitAnimations(Texture2D spriteSheet)
        {
            switch(enemyType)
            {
                case Constants.EnemyType.Grunt:
                    walking = new Animation(spriteSheet, 0, 64, 85, 0, 2, 100, false, true);
                    break;
            }

            currentAnimation = walking;
        }