Пример #1
0
        public Formation(BattleScreen screen, float x, float y, int initialCapacity, int side)
        {
            _screen = screen;
            _position = new Vector2(x, y);
            _size = Vector2.Zero;
            _soldiers = new ArrayList(initialCapacity);
            _soldiersToRemove = new ArrayList(initialCapacity);
            _soldiersToMove = new ArrayList(initialCapacity);
            _width = 5;
            _shotRows = new ArrayList(5);
            _pikeRows = new ArrayList(5);
            _meleeRows = new ArrayList(5);
 //           _swingerRows = new ArrayList(5);
            _cavRows = new ArrayList(5);
            _supportRows = new ArrayList(2);
            _enemiesToGuard = new ArrayList(20);
            _enemiesToShoot = new ArrayList(20);
            _shotsToBlock = new ArrayList(20);
            if (_side == BattleScreen.SIDE_PLAYER)
                _speed = 0.1f;
                //_speed = 0.2f;

            _state = STATE_SHOT;
            
            _side = side;
            needTriggerUp = false;
            _needResetupFormation = false;
            _addedSoldier = false;
            DEBUGdangerClose = false;
            selected = false;
            retreated = false;
            numberOfPikes = 0;
            numberOfShots = 0;
        }
Пример #2
0
 public Terrain(BattleScreen screen, Texture2D sprite, int side, float x, float y, Rectangle collisionBox)
     : this(screen, sprite, side, x, y)
 {
     this.collisionBox = collisionBox;
     collisionCenter = new Vector2(collisionBox.X + collisionBox.Width / 2, collisionBox.Y + collisionBox.Height / 2);
     collidable = true;
 }
Пример #3
0
 public Terrain(BattleScreen screen, Texture2D sprite, int side, float x, float y, float restTime, float animationTime)
     : this(screen, sprite, side, x, y)
 {
     _sprite = new Sprite(sprite, new Rectangle(0, 0, 0, 0), 40, 40, true);
     _restTime = restTime;
     _animationTime = animationTime;
 }
Пример #4
0
 public Terrain(BattleScreen screen, Texture2D sprite, int side, float x, float y)
     : base(screen, side)
 {
     _position = new Vector2(x, y);
     _state = STATE_SHOWN;
     _sprite = new Sprite(sprite, new Rectangle(0, 0, 0, 0), sprite.Width, sprite.Height, false);
     _stateTimer = _restTime;
     _drawingY = _position.Y + sprite.Height;
     generated = false;
 }
Пример #5
0
 public Terrain(BattleScreen screen, Texture2D sprite, int side, float x, float y, float restTime, float animationTime)
     : base(screen, side)
 {
     _position = new Vector2(x, y);
     _state = STATE_SHOWN;
     _sprite = new Sprite(sprite, new Rectangle(0, 0, 0, 0), 40, 40, true);
     _restTime = restTime;
     _animationTime = animationTime;
     _stateTimer = _restTime;
     _drawingY = _position.Y + 40f;
 }
Пример #6
0
        public AimedBolt(Vector2 position, BattleScreen screen, int side, float height, Vector2 target, Soldier targetSoldier)
            : base(position, screen, side, height)
        {
            _speed = 0.5f;
            _lifeTime = 1000f;
            Vector2 _delta = target - position;

            double angle = Math.Atan2(_delta.Y, _delta.X);
            double cos = Math.Cos(angle);
            double sin = Math.Sin(angle);
            _trajectory = new Vector2((float)cos * _speed, (float)sin * _speed);
            this.targetSoldier = targetSoldier;
        }
Пример #7
0
        public Coin(BattleScreen screen, Vector2 position, Vector2 finalPosition)
            : base(screen, BattleScreen.SIDE_PLAYER, position, new Sprite(PikeAndShotGame.COIN, new Rectangle(0, 0, 24, 14), 24, 14, false, true, 128), COIN_TIME)
        {
            int rando = PikeAndShotGame.random.Next(3);
            if (rando == 1)
                _position.X += 2f;
            else if (rando == 2)
                _position.X -= 2f;

            _drop = false;
            velocity = 0f;//-1.5f;
            doneFlashing = false;
            this.finalPosition = finalPosition;
            coinSound = PikeAndShotGame.COIN_SOUND.CreateInstance();
            coinSound.Volume = 0.25f;
            playCoinSound = true;
        }
Пример #8
0
        public Arquebusier(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_SHOT;
            _class = Soldier.CLASS_MERC_ARQUEBUSIER;
            _attackTime = 150f;
            _reloadTime = 3000f;

            _feet = new Sprite(PikeAndShotGame.ARQUEBUSIER_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true, true, 25);
            _feet.flashable = false;
            _idle = new Sprite(PikeAndShotGame.ARQUEBUSIER_IDLE, new Rectangle(6, 4, 16, 28), 44, 42);
            _death = new Sprite(PikeAndShotGame.ARQUEBUSIER_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
            _melee1 = new Sprite(PikeAndShotGame.ARQUEBUSIER_MELEE, new Rectangle(8, 12, 16, 28), 48, 48);
            _route = new Sprite(PikeAndShotGame.ARQUEBUSIER_ROUTE, new Rectangle(16, 16, 16, 28), 48, 52);
            _routed = new Sprite(PikeAndShotGame.ARQUEBUSIER_ROUTED, new Rectangle(16, 16, 16, 28), 52, 52, true);
            _arquebusierReload = new Sprite(PikeAndShotGame.ARQUEBUSIER_RELOAD, new Rectangle(8, 4, 16, 28), 44, 42, false, true, 25);
            _arquebusierShoot = new Sprite(PikeAndShotGame.ARQUEBUSIER_SHOOT, new Rectangle(6, 4, 16, 28), 44, 42);

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            shotHitSound = PikeAndShotGame.SHOT_HIT.CreateInstance();
            shotHitSound.Volume = 0.25f;
        }
Пример #9
0
        public Soldier(BattleScreen screen, int side, float x, float y)
            : base(screen, side)
        {
            _position = new Vector2(x, y);
            _destination = new Vector2(x, y);
            _dest = new Vector2(0,0);
            _meleeDestination = new Vector2(0, 0);
            _drawingPosition = Vector2.Zero;
            _randDestOffset = new Vector2(PikeAndShotGame.getRandPlusMinus(3), 0);
            _lastAction = PatternAction.ACTION_IDLE;
            _delta = Vector2.Zero;
            _travel = Vector2.Zero;
            _state = STATE_READY;
            _stateTimer = 0;
            _stateChanged = false;
            _shotMade = false;
            _stateToHave = -1;
            _meleeTime = 1500f;
            _longMeleeTime = 3000f;
            _oneAttackTime = _meleeTime/3f;
            _deathTime = 2000f;
            _routeTime = 500f;
            _routedTime = 100f;
            _plusMinus = 0f;
            _jostleOffset = Vector2.Zero;
            _guardPositionOffset = Vector2.Zero;
            _reacting = false;
            _longMelee = 0;
            _drawingY = _position.Y + 36f;
            _speed = 0.15f;
            _footSpeed = 15;
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_MERC_SOLDIER;
            _attackTime = 600f;
            _reloadTime = 1000f;
            guardTarget = null;
            guardTargetRange = 0f;
            guardTargetDist = 0f;
            _engager = null;
            _chargeTime = 800f;//400f;

            _feet = new Sprite(PikeAndShotGame.SOLDIER_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _idle = new Sprite(PikeAndShotGame.SOLDIER_IDLE, new Rectangle(10, 2, 16, 28), 46, 42);
            _death = new Sprite(PikeAndShotGame.SOLDIER_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
            _melee1 = new Sprite(PikeAndShotGame.SOLDIER_MELEE1, new Rectangle(14, 10, 16, 28), 62, 46);
            _defend1 = new Sprite(PikeAndShotGame.SOLDIER_DEFEND1, new Rectangle(16, 10, 16, 28), 54, 46);
            // just giving all soldiers the slinger routes for now
            _route = new Sprite(PikeAndShotGame.SOLDIER_ROUTE, new Rectangle(26, 16, 16, 28), 70, 52);
            _routed = new Sprite(PikeAndShotGame.SOLDIER_ROUTED, new Rectangle(16, 16, 16, 28), 50, 52, true);
            _retreat = new Sprite(PikeAndShotGame.SLINGER_RETREAT, new Rectangle(6, 2, 16, 28), 46, 40, true);
            _charge = new Sprite(PikeAndShotGame.SOLDIER_CHARGE, new Rectangle(20, 20, 16, 28), 60, 56);

            _body = _idle;

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            _retreat.setAnimationSpeed(_footSpeed / 0.11f);
            inPlayerFormation = false;

            // DEBUG VARS
            DEBUGFOUNDPIKE = false;
            bodyFallSound = PikeAndShotGame.BODY_FALL.CreateInstance();
            bodyFallSound.Volume = 0.3f;
            hitSound = PikeAndShotGame.OWW_ALLY.CreateInstance();
            chargeSound = PikeAndShotGame.CHARGE_ROAR.CreateInstance();
            chargeSound.Volume = 0.25f;
            playedFallSound = false;
        }
Пример #10
0
        public Pikeman(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_PIKE;
            _class = Soldier.CLASS_MERC_PIKEMAN;
            _attackTime = 450f;
            _reloadTime = 600f;
            guardTargetRange = 74;
            guardTargetDist = 100;
            breakRange = Soldier.WIDTH * 10f;

            if (PikeAndShotGame.random.Next(51) > 25)
            {
                _idle = new Sprite(PikeAndShotGame.PIKEMAN1_IDLE, new Rectangle(6, 68, 16, 28), 26, 106);
                _death = new Sprite(PikeAndShotGame.PIKEMAN1_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
                _pikemanLowerLow = new Sprite(PikeAndShotGame.PIKEMAN1_LOWER_LOW, new Rectangle(32, 67, 16, 28), 124, 106);
                _pikemanLowerHigh = new Sprite(PikeAndShotGame.PIKEMAN1_LOWER_HIGH, new Rectangle(32, 67, 16, 28), 124, 106);
                _pikemanRecoil = new Sprite(PikeAndShotGame.PIKEMAN1_RECOIL, new Rectangle(28, 4, 16, 28), 108, 36);
                _melee1 = new Sprite(PikeAndShotGame.PIKEMAN1_MELEE, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend1 = new Sprite(PikeAndShotGame.PIKEMAN1_DEFEND, new Rectangle(20, 2, 16, 28), 52, 40);
            }
            else
            {
                _idle = new Sprite(PikeAndShotGame.PIKEMAN2_IDLE, new Rectangle(6, 68, 16, 28), 26, 106);
                _death = new Sprite(PikeAndShotGame.PIKEMAN2_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
                _pikemanLowerLow = new Sprite(PikeAndShotGame.PIKEMAN2_LOWER_LOW, new Rectangle(32, 67, 16, 28), 124, 106);
                _pikemanLowerHigh = new Sprite(PikeAndShotGame.PIKEMAN2_LOWER_HIGH, new Rectangle(32, 67, 16, 28), 124, 106);
                _pikemanRecoil = new Sprite(PikeAndShotGame.PIKEMAN2_RECOIL, new Rectangle(28, 4, 16, 28), 108, 36);
                _melee1 = new Sprite(PikeAndShotGame.PIKEMAN2_MELEE, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend1 = new Sprite(PikeAndShotGame.PIKEMAN2_DEFEND, new Rectangle(20, 2, 16, 28), 52, 40);
            }
            _feet = new Sprite(PikeAndShotGame.PIKEMAN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _route = new Sprite(PikeAndShotGame.PIKEMAN_ROUTE, new Rectangle(6, 78, 16, 28), 50, 116);
            _routed = new Sprite(PikeAndShotGame.PIKEMAN_ROUTED, new Rectangle(6, 78, 16, 28), 48, 116, true);

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            _loweredSprite = _pikemanLowerLow;

            _pikeTip = new PikeTip(_screen, this);
        }
Пример #11
0
        public Slinger(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_SHOT;
            _class = Soldier.CLASS_GOBLIN_SLINGER;
            _attackTime = 600f;
            _reloadTime = 1000f;
            soundMade = false;

            if (PikeAndShotGame.random.Next(51) > 25)
            {
                _idle = new Sprite(PikeAndShotGame.SLINGER_IDLE, new Rectangle(6, 2, 16, 28), 34, 40);
                _slingerReload = new Sprite(PikeAndShotGame.SLINGER_RELOAD, new Rectangle(28, 12, 16, 28), 72, 50);
                _slingerShoot = new Sprite(PikeAndShotGame.SLINGER_SHOOT, new Rectangle(28, 12, 16, 28), 72, 50);
                _death = new Sprite(PikeAndShotGame.SLINGER_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
                _melee1 = new Sprite(PikeAndShotGame.SLINGER_MELEE, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend1 = new Sprite(PikeAndShotGame.SLINGER_DEFEND, new Rectangle(20, 2, 16, 28), 52, 40);
                _retreat = new Sprite(PikeAndShotGame.SLINGER_RETREAT, new Rectangle(6, 2, 16, 28), 46, 40, true);
                variant = false;
            }
            else
            {
                _idle = new Sprite(PikeAndShotGame.SKIRMISHER_IDLE, new Rectangle(10, 2, 16, 28), 46, 42);
                _slingerReload = new Sprite(PikeAndShotGame.SKIRMISHER_RELOAD, new Rectangle(28, 12, 16, 28), 72, 50);
                _slingerShoot = new Sprite(PikeAndShotGame.SKIRMISHER_SHOOT, new Rectangle(28, 12, 16, 28), 72, 50);
                _death = new Sprite(PikeAndShotGame.SKIRMISHER_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
                _melee1 = new Sprite(PikeAndShotGame.SKIRMISHER_MELEE, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend1 = new Sprite(PikeAndShotGame.SKIRMISHER_DEFEND, new Rectangle(20, 2, 16, 28), 52, 40);
                _retreat = new Sprite(PikeAndShotGame.SKIRMISHER_RETREAT, new Rectangle(6, 2, 16, 28), 46, 40, true);
                variant = true;
            }
            _feet = new Sprite(PikeAndShotGame.SOLDIER_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _route = new Sprite(PikeAndShotGame.SLINGER_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
            _routed = new Sprite(PikeAndShotGame.SLINGER_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            _retreat.setAnimationSpeed(_footSpeed / _speed);
            slingSound = PikeAndShotGame.SLING_ROCK.CreateInstance();
            rockHitSound = PikeAndShotGame.ROCK_HIT.CreateInstance();
            rockHitSound.Volume = 0.6f;
            hitSound = PikeAndShotGame.OWW_ENEMY.CreateInstance();
            hitSound.Volume = 0.25f;
        }
Пример #12
0
        public Leader(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_SUPPORT;
            _class = Soldier.CLASS_LEADER_PUCELLE;

            _idle = new Sprite(PikeAndShotGame.PUCELLE_IDLE, new Rectangle(6, 68, 16, 28), 54, 106);
            _motion = new Sprite(PikeAndShotGame.PUCELLE_MOTION, new Rectangle(6, 68, 16, 28), 90, 110);

            _feet = new Sprite(PikeAndShotGame.PIKEMAN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            _retreat.setAnimationSpeed(_footSpeed / _speed);
            _stateTimer = _idleTime = 3000f;
            _motionTime = 2000f;
        }
Пример #13
0
        public NPCFleer(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_NPC_FLEER;

            int r = PikeAndShotGame.random.Next(6);
            _flee = null;
            _fleeTime = 2000f;

            switch(r)
            {
                case 0:
                    _idle = new Sprite(PikeAndShotGame.PEASANT1_IDLE, new Rectangle(10, 8, 16, 28), 42, 42);
                    _flee = new Sprite(PikeAndShotGame.PEASANT1_FLEE, new Rectangle(10, 8, 16, 28), 36, 42);
                    _feet = new Sprite(_screen._game.getDimmerClone(PikeAndShotGame.BLUE_FEET), new Rectangle(4, 2, 16, 12), 26, 16, true);
                    _state = STATE_FLEE;
                    _fleeTime = 2500f;
                    _stateTimer = _fleeTime;
                    break;
                case 1:
                    _idle = new Sprite(PikeAndShotGame.PEASANT2_IDLE, new Rectangle(10, 8, 16, 28), 42, 42);
                    _feet = new Sprite(_screen._game.getDimmerClone(PikeAndShotGame.BLUE_FEET), new Rectangle(4, 2, 16, 12), 26, 16, true);
                    break;
                case 2:
                    _idle = new Sprite(PikeAndShotGame.PEASANT3_IDLE, new Rectangle(10, 8, 16, 28), 42, 42);
                    _feet = new Sprite(_screen._game.getDimmerClone(PikeAndShotGame.BLUE_FEET), new Rectangle(4, 2, 16, 12), 26, 16, true);
                    break;
                case 3:
                    _idle = new Sprite(PikeAndShotGame.PEASANT4_IDLE, new Rectangle(10, 8, 16, 28), 42, 42);
                    _feet = new Sprite(_screen._game.getDimmerClone(PikeAndShotGame.BLUE_FEET), new Rectangle(4, 2, 16, 12), 26, 16, true);
                    break;
                case 4:
                    _idle = new Sprite(PikeAndShotGame.PEASANT5_IDLE, new Rectangle(10, 8, 16, 28), 42, 42);
                    _flee = new Sprite(PikeAndShotGame.PEASANT5_FLEE, new Rectangle(10, 8, 16, 28), 38, 48);
                    _feet = new Sprite(_screen._game.getDimmerClone(PikeAndShotGame.SOLDIER_FEET), new Rectangle(4, 2, 16, 12), 26, 16, true);
                    _state = STATE_FLEE;
                    _stateTimer = _fleeTime;
                    break;
                case 5:
                    _idle = new Sprite(PikeAndShotGame.PEASANT6_IDLE, new Rectangle(8, 12, 16, 28), 34, 48);
                    _feet = new Sprite(_screen._game.getDimmerClone(PikeAndShotGame.GOBLIN_FEET), new Rectangle(4, 2, 16, 12), 26, 16, true);
                    break;
            }
            _speed = 0.1f;
            _feet.setAnimationSpeed(_footSpeed / (_speed - 0.04f));
        }
Пример #14
0
        public Targeteer(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_MERC_SOLDIER;
            _defendTimer = 0f;
            _shieldBreakTime = 1500f;
            _coverTime = 375f;
            _shieldRecoilTime = 150f;

            if (PikeAndShotGame.random.Next(2) == 0)
            {
                _shieldBlock = new ShieldBlock(screen, this);
                _shieldBreak = new Sprite(PikeAndShotGame.SOLDIER_SHIELDBREAK, new Rectangle(24, 4, 16, 28), 60, 46);
                _noshieldIdle = new Sprite(PikeAndShotGame.SOLDIER_IDLENOSHIELD, new Rectangle(10, 2, 16, 28), 46, 42);
                _shieldFall = new Sprite(PikeAndShotGame.SOLDIER_FALL, new Rectangle(76, 42, 16, 18), 110, 86);
                _melee2 = new Sprite(PikeAndShotGame.SOLDIER_MELEE2, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend2 = new Sprite(PikeAndShotGame.SOLDIER_DEFEND2, new Rectangle(20, 2, 16, 28), 52, 40);
                _chargeNoShield = new Sprite(PikeAndShotGame.SOLDIER_CHARGENOSHIELD, new Rectangle(20, 20, 16, 28), 60, 56);
                _feet = new Sprite(PikeAndShotGame.BLUE_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
                _hasShield = true;
            }
            else
            {
                _shieldBlock = new ShieldBlock(screen, this);
                _shieldBreak = new Sprite(PikeAndShotGame.SOLDIER_SHIELDBREAK, new Rectangle(24, 4, 16, 28), 60, 46);
                _idle = _noshieldIdle = new Sprite(PikeAndShotGame.SOLDIER2_IDLE, new Rectangle(12, 16, 16, 28), 64, 46);
                _shieldFall = new Sprite(PikeAndShotGame.SOLDIER_FALL, new Rectangle(76, 42, 16, 18), 110, 86);
                _melee2 = new Sprite(PikeAndShotGame.SOLDIER2_MELEE2, new Rectangle(16, 30, 16, 28), 78, 60);
                _defend2 = new Sprite(PikeAndShotGame.SOLDIER2_DEFEND2, new Rectangle(12, 16, 16, 28), 64, 46);
                _chargeNoShield = new Sprite(PikeAndShotGame.SOLDIER_CHARGENOSHIELD, new Rectangle(20, 20, 16, 28), 60, 56);
                _feet = new Sprite(PikeAndShotGame.BLUE_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
                _hasShield = false;
                _body = _noshieldIdle;
            }

            shieldBreakSound = PikeAndShotGame.SHIELD_BREAK.CreateInstance();
            shieldBreakSound.Volume = 0.5f;
        }
Пример #15
0
        public void setScreen(int screenIndex)
        {
            if (screenIndex >= 0 && screenIndex <= SCREEN_LEVELEDITOR)
                _currScreen = (BattleScreen)_gameScreens[screenIndex];

            //if (screenIndex == SCREEN_LEVELEDITOR)
            //    _form.Show();
            //else
             //   _form.Hide();

            if (screenIndex == SCREEN_LEVELPLAY)
                ((LevelScreen)_currScreen).restart();
        }
Пример #16
0
 public ScreenObject(BattleScreen screen, int side)
 {
     _screen = screen;
     _side = side;
     _screen.addScreenObject(this);
     _guardPositionOffset = Vector2.Zero;
 }
Пример #17
0
        public Dopple(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_SWINGER;
            _class = Soldier.CLASS_MERC_DOPPLE;
            _attackTime = 300f;
            _reloadTime = 500f;
            guardTargetDist = (float)getWidth()*3f;
            guardTargetRange = 2000f;
            breakRange = Soldier.WIDTH * 1000f;
            _chargeTime = 200f;

            _feet = new Sprite(PikeAndShotGame.PIKEMAN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _idle = new Sprite(PikeAndShotGame.DOPPLE_IDLE, new Rectangle(20, 6, 16, 28), 44, 42);
            _death = new Sprite(PikeAndShotGame.DOPPLE_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
            _melee1 = new Sprite(PikeAndShotGame.DOPPLE_SWING1, new Rectangle(24, 20, 16, 28), 76, 68);
            _defend1 = new Sprite(PikeAndShotGame.DOPPLE_RELOAD1, new Rectangle(24, 16, 16, 28), 76, 64);
            _route = new Sprite(PikeAndShotGame.DOPPLE_ROUTE, new Rectangle(30, 12, 16, 28), 76, 48);
            _routed = new Sprite(PikeAndShotGame.DOPPLE_ROUTED, new Rectangle(30, 12, 16, 28), 76, 49, true);
            _doppleReload1 = new Sprite(PikeAndShotGame.DOPPLE_RELOAD1, new Rectangle(24, 16, 16, 28), 76, 64);
            _doppleSwing1 = new Sprite(PikeAndShotGame.DOPPLE_SWING1, new Rectangle(24, 20, 16, 28), 76, 68);

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            _weaponSwing = new WeaponSwing(_screen, this);
            _screen.removeScreenObject(_weaponSwing);
            playerFormation = _screen.getPlayerFormation();
            _speed = 0.15f;
            possibleTargets = new ArrayList(5);
            slashSound = PikeAndShotGame.SLASH.CreateInstance();
        }
Пример #18
0
 public CrossbowmanPavise(BattleScreen screen, float x, float y, int side)
     : base(screen, x, y, side)
 {
     _type = TYPE_SWINGER;
     _class = Soldier.CLASS_MERC_CROSSBOWMAN_PAVISE;
     hasPavise = true;
     _idle = new Sprite(PikeAndShotGame.CROSSBOWMAN_PAVISE, new Rectangle(10, 2, 16, 28), 44, 38);
     _crossbowmanReload = new Sprite(PikeAndShotGame.CROSSBOWMAN_RELOAD2, new Rectangle(8, 4, 16, 28), 44, 42);
     _crossbowmanPavisePlace = new Sprite(PikeAndShotGame.CROSSBOWMAN_PAVISE_PLACE, new Rectangle(12, 2, 16, 28), 46, 38);
     _shieldBreak = new Sprite(PikeAndShotGame.CROSSBOWMAN_SHIELDBREAK, new Rectangle(24, 4, 16, 28), 60, 46);
     if(side == BattleScreen.SIDE_ENEMY)
         _placeTime = 800f;
     else
         _placeTime = 200f;
     _chargeTime = 200f;
     _attackTime = 150f;
     possibleTargets = new ArrayList();
     chargePosition = new Vector2(100f, -13f);
 }
Пример #19
0
        public Wolf(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_GOBLIN_WOLF;
            _idleTime = 3000f;
            _attackTime = 700f;
            _turnTime = 300f;
            _idleAnimTime = 1000f;
            _deathTime = 800f;
            _howlTime = 1000f;
            _turned = false;
            _killTime = 1500f;

            flee = false;
            retreat = false;

            if (PikeAndShotGame.random.Next(2) == 0)
            {
                _idleFeet = new Sprite(PikeAndShotGame.WOLF_IDLE, new Rectangle(16, 18, 14, 14), 48, 38, true);
                _death = new Sprite(PikeAndShotGame.WOLF_SPOOKED, new Rectangle(18, 16, 14, 14), 48, 38, true);
                _turnFeet = new Sprite(PikeAndShotGame.WOLF_TURN, new Rectangle(26, 10, 14, 14), 54, 26, true);
                _attackFeet = new Sprite(PikeAndShotGame.WOLF_BITE, new Rectangle(20, 8, 14, 14), 54, 26, true);
                _melee1 = new Sprite(PikeAndShotGame.WOLF_MELEE, new Rectangle(16, 10, 14, 14), 64, 24, true);
                _defend1 = new Sprite(PikeAndShotGame.WOLF_DEFEND, new Rectangle(16, 12, 14, 14), 64, 26, true);
                _killFeet = new Sprite(PikeAndShotGame.WOLF_KILL, new Rectangle(14, 12, 14, 14), 68, 28, true);
                _howlFeet = new Sprite(PikeAndShotGame.WOLF_HOWL, new Rectangle(18, 24, 14, 14), 52, 40, true);
                _feet = _runningFeet = new Sprite(PikeAndShotGame.WOLF_RUN, new Rectangle(16, 10, 14, 14), 44, 26, true);
            }
            else
            {
                _idleFeet = new Sprite(PikeAndShotGame.WOLF_IDLEg, new Rectangle(16, 18, 14, 14), 48, 38, true);
                _death = new Sprite(PikeAndShotGame.WOLF_SPOOKEDg, new Rectangle(18, 16, 14, 14), 48, 38, true);
                _turnFeet = new Sprite(PikeAndShotGame.WOLF_TURNg, new Rectangle(26, 10, 14, 14), 54, 26, true);
                _attackFeet = new Sprite(PikeAndShotGame.WOLF_BITEg, new Rectangle(20, 8, 14, 14), 54, 26, true);
                _melee1 = new Sprite(PikeAndShotGame.WOLF_MELEEg, new Rectangle(16, 10, 14, 14), 64, 24, true);
                _defend1 = new Sprite(PikeAndShotGame.WOLF_DEFENDg, new Rectangle(16, 12, 14, 14), 64, 26, true);
                _killFeet = new Sprite(PikeAndShotGame.WOLF_KILLg, new Rectangle(14, 12, 14, 14), 68, 28, true);
                _howlFeet = new Sprite(PikeAndShotGame.WOLF_HOWLg, new Rectangle(18, 24, 14, 14), 52, 40, true);
                _feet = _runningFeet = new Sprite(PikeAndShotGame.WOLF_RUNg, new Rectangle(16, 10, 14, 14), 44, 26, true);
            }

            _howlFeet.setMaxFrames(_howlFeet.getMaxFrames() - 1);
            _body = _idle;
            _footSpeed = 6.5f;
            _speed = 0.24f;
            _feet.setAnimationSpeed(_footSpeed/0.11f);
            _stateTimer = PikeAndShotGame.random.Next((int)_idleTime);
        }
Пример #20
0
        public Crossbowman(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_SHOT;
            _class = Soldier.CLASS_MERC_CROSSBOWMAN;
            _attackTime = 300f;
            _reloadTime = 2000f;

            _feet = new Sprite(PikeAndShotGame.PIKEMAN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _idle = new Sprite(PikeAndShotGame.CROSSBOWMAN_IDLE, new Rectangle(6, 4, 16, 28), 44, 42);
            _death = new Sprite(PikeAndShotGame.CROSSBOWMAN_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
            _melee1 = new Sprite(PikeAndShotGame.CROSSBOWMAN_MELEE2, new Rectangle(24, 30, 16, 28), 64, 68);
            _defend1 = new Sprite(PikeAndShotGame.CROSSBOWMAN_DEFEND2, new Rectangle(20, 2, 16, 28), 52, 40);
            _route = new Sprite(PikeAndShotGame.CROSSBOWMAN_ROUTE, new Rectangle(16, 16, 16, 28), 50, 52);
            _routed = new Sprite(PikeAndShotGame.CROSSBOWMAN_ROUTED, new Rectangle(16, 16, 16, 28), 50, 52, true);
            _crossbowmanReload = new Sprite(PikeAndShotGame.CROSSBOWMAN_RELOAD, new Rectangle(8, 4, 16, 28), 44, 42);
            _crossbowmanShoot = new Sprite(PikeAndShotGame.CROSSBOWMAN_SHOOT, new Rectangle(6, 4, 16, 28), 44, 42);

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
        }
Пример #21
0
        public ColmillosWolf(BattleScreen screen, Vector2 position, int side)
            : base(screen, position.X, position.Y, side)
        {
            _getUp = new Sprite(PikeAndShotGame.WOLF_GETUP_COL, new Rectangle(24, 14, 14, 14), 52, 34, false);
            _idleFeet = new Sprite(PikeAndShotGame.WOLF_IDLE_COL, new Rectangle(16, 18, 14, 14), 48, 38, true);
            _turnFeet = new Sprite(PikeAndShotGame.WOLF_TURN_COL, new Rectangle(26, 10, 14, 14), 54, 26, true);
            _attackFeet = new Sprite(PikeAndShotGame.WOLF_ATTACK_COL, new Rectangle(20, 8, 14, 14), 54, 26, true);
            _howlFeet = new Sprite(PikeAndShotGame.WOLF_HOWL_COL, new Rectangle(20, 24, 14, 14), 54, 40, true);
            _runningFeet = new Sprite(PikeAndShotGame.WOLF_RUN_COL, new Rectangle(16, 10, 14, 14), 44, 26, true);
            _howlFeet.setMaxFrames(_howlFeet.getMaxFrames() - 1);
            _footSpeed = 6.5f;
            _speed = 0.24f;
            _runningFeet.setAnimationSpeed(_footSpeed / 0.11f);

            schedule = new WolfSchedule[6];

            for (int i = 0 ; i < schedule.Length; i++)
                schedule[0] = new WolfSchedule();

            _howlTime = 1800f;

            schedule[0].state = STATE_SIT;
            schedule[0].time = SIT_TIME;
            schedule[1].state = STATE_GETUP;
            schedule[1].time = 2500f;
            schedule[2].state = STATE_ATTACK;
            schedule[2].time = _attackTime + 200f;
            schedule[3].state = STATE_ATTACK;
            schedule[3].time = _attackTime + 1000f;
            schedule[4].state = STATE_HOWLING;
            schedule[4].time = _howlTime;
            schedule[5].state = STATE_FLEE;
            schedule[5].time = 1000f;

            _state = STATE_SIT;

            yellSound = PikeAndShotGame.COLMILLOS_YELL.CreateInstance();
        }
Пример #22
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            viewport = GraphicsDevice.Viewport;

            setDrawRect();

            soldierFont = Content.Load<SpriteFont>("SpriteFont1");

            ShaderRenderTarget = new RenderTarget2D(GraphicsDevice, SCREENWIDTH, SCREENHEIGHT, false, SurfaceFormat.Color, DepthFormat.None);
            ShaderRenderTarget2 = new RenderTarget2D(GraphicsDevice, SCREENWIDTH, SCREENHEIGHT, false, SurfaceFormat.Color, DepthFormat.None);

            effect = Content.Load<Effect>(@"newshader");
            effect.Parameters["Viewport"].SetValue(new Vector2((float)SCREENWIDTH, (float)SCREENHEIGHT));

            effect2 = Content.Load<Effect>(@"newshader2");
            effect2.Parameters["Viewport"].SetValue(new Vector2((float)SCREENWIDTH, (float)SCREENHEIGHT));
            effect2.Parameters["iResolution"].SetValue(new Vector2((float)SCREENWIDTH, (float)SCREENHEIGHT) *1.5f);

            //TERRAIN_DRY_GRASS = Content.Load<Texture2D>(@"dry_grass");
            ROAD_TERRAIN = new List<Texture2D>(11);

            for(int i = 0; i < 11; i++)
                ROAD_TERRAIN.Add(Content.Load<Texture2D>(@"roadTerrain" + i));

            PUCELLE_IDLE = Content.Load<Texture2D>(@"pucelle_ready2");
            PUCELLE_MOTION = Content.Load<Texture2D>(@"pucelle_motion");

            SOLDIER_FEET = Content.Load<Texture2D>(@"soldier_feet");
            SOLDIER_IDLE = Content.Load<Texture2D>(@"soldier_idle");
            SOLDIER_DEATH = Content.Load<Texture2D>(@"soldier_death");
            SOLDIER_MELEE1 = Content.Load<Texture2D>(@"soldier_melee1");
            SOLDIER_DEFEND1 = Content.Load<Texture2D>(@"soldier_defend1");
            SOLDIER_MELEE2 = Content.Load<Texture2D>(@"soldier_melee2");
            SOLDIER_DEFEND2 = Content.Load<Texture2D>(@"soldier_defend2");
            SOLDIER_SHIELDBREAK = Content.Load<Texture2D>(@"soldier_shieldbreak");
            SOLDIER_FALL = Content.Load<Texture2D>(@"soldier_fall");
            SOLDIER_BROKENSHIELD1 = Content.Load<Texture2D>(@"brokenshield1");
            SOLDIER_BROKENSHIELD2 = Content.Load<Texture2D>(@"brokenshield2");
            SOLDIER_BROKENARMOUR = Content.Load<Texture2D>(@"brokenarmour");
            SOLDIER_IDLENOSHIELD = Content.Load<Texture2D>(@"soldier_idlenoshield");
            SOLDIER_ROUTE = Content.Load<Texture2D>(@"soldier_route");
            SOLDIER_ROUTED = Content.Load<Texture2D>(@"soldier_routed");
            SOLDIER_CHARGENOSHIELD = Content.Load<Texture2D>(@"soldier_chargenoshield");
            SOLDIER_CHARGE = Content.Load<Texture2D>(@"soldier_charge");

            CAVALRY_HORSE_IDLE = Content.Load<Texture2D>(@"horse_idle");
            CAVALRY_HORSE_RUN = Content.Load<Texture2D>(@"horse_run");
            CAVALRY_HORSE_HALT = Content.Load<Texture2D>(@"horse_halt");
            CAVALRY_HORSE_TURN = Content.Load<Texture2D>(@"horse_turn");
            CAVALRY_HORSE_DEATH = Content.Load<Texture2D>(@"horse_death");
            CAVALRY_LEFTFOOT = Content.Load<Texture2D>(@"cavalry_leftfoot");
            CAVALRY_RIGHTFOOT = Content.Load<Texture2D>(@"cavalry_rightfoot");
            CAVALRY_LEFTIDLE = Content.Load<Texture2D>(@"cavalry_leftidle");
            CAVALRY_RIGHTIDLE = Content.Load<Texture2D>(@"cavalry_rightidle");
            CAVALRY_LEFTLOWER = Content.Load<Texture2D>(@"cavalry_leftlower");
            CAVALRY_RIGHTLOWER = Content.Load<Texture2D>(@"cavalry_rightlower");
            CAVALRY_LEFTRECOIL = Content.Load<Texture2D>(@"cavalry_leftrecoil");
            CAVALRY_RIGHTRECOIL = Content.Load<Texture2D>(@"cavalry_rightrecoil");

            CAVALRY_FALL = Content.Load<Texture2D>(@"cavalry_fall");
            DISMOUNTED_CAVALRY_IDLE = Content.Load<Texture2D>(@"dismountedcavalry_idle");
            DISMOUNTED_CAVALRY_DEATH = Content.Load<Texture2D>(@"dismountedcavalry_death");
            DISMOUNTED_CAVALRY_IDLENOSHIELD = Content.Load<Texture2D>(@"dismountedcavalry_idlenoshield");
            DISMOUNTED_CAVALRY_SHIELDBREAK = Content.Load<Texture2D>(@"dismountedcavalry_shieldbreak");
            DISMOUNTED_CAVALRY_FALL = Content.Load<Texture2D>(@"dismountedcavalry_fall");
            DISMOUNTED_CAVALRY_MELEE1 = Content.Load<Texture2D>(@"dismountedcavalry_melee1");
            DISMOUNTED_CAVALRY_DEFEND1 = Content.Load<Texture2D>(@"dismountedcavalry_defend1");

            PIKEMAN_FEET = Content.Load<Texture2D>(@"pikeman_feet");
            PIKEMAN_IDLE = Content.Load<Texture2D>(@"pikeman_idle");
            PIKEMAN_LOWER_LOW = Content.Load<Texture2D>(@"pikeman_lower_low");
            PIKEMAN_LOWER_HIGH = Content.Load<Texture2D>(@"pikeman_lower_high");
            PIKEMAN_RECOIL = Content.Load<Texture2D>(@"pikeman_recoil");
            PIKEMAN_DEATH = Content.Load<Texture2D>(@"pikeman_death");
            PIKEMAN1_IDLE = Content.Load<Texture2D>(@"pikeman1_idle");
            PIKEMAN1_LOWER_LOW = Content.Load<Texture2D>(@"pikeman1_lower_low");
            PIKEMAN1_LOWER_HIGH = Content.Load<Texture2D>(@"pikeman1_lower_high");
            PIKEMAN1_RECOIL = Content.Load<Texture2D>(@"pikeman1_recoil");
            PIKEMAN1_DEATH = Content.Load<Texture2D>(@"pikeman1_death");
            PIKEMAN1_MELEE = Content.Load<Texture2D>(@"pikeman1_melee1");
            PIKEMAN1_DEFEND = Content.Load<Texture2D>(@"pikeman1_defend1");
            PIKEMAN2_IDLE = Content.Load<Texture2D>(@"pikeman2_idle");
            PIKEMAN2_LOWER_LOW = Content.Load<Texture2D>(@"pikeman2_lower_low");
            PIKEMAN2_LOWER_HIGH = Content.Load<Texture2D>(@"pikeman2_lower_high");
            PIKEMAN2_RECOIL = Content.Load<Texture2D>(@"pikeman2_recoil");
            PIKEMAN2_DEATH = Content.Load<Texture2D>(@"pikeman2_death");
            PIKEMAN2_MELEE = Content.Load<Texture2D>(@"pikeman2_melee1");
            PIKEMAN2_DEFEND = Content.Load<Texture2D>(@"pikeman2_defend1");
            PIKEMAN_MELEE = Content.Load<Texture2D>(@"pikeman_melee");
            PIKEMAN_ROUTE = Content.Load<Texture2D>(@"pikeman_route");
            PIKEMAN_ROUTED = Content.Load<Texture2D>(@"pikeman_routed");

            ARQUEBUSIER_FEET = Content.Load<Texture2D>(@"arquebusier_feet");
            ARQUEBUSIER_IDLE = Content.Load<Texture2D>(@"arquebusier_idle");
            ARQUEBUSIER_RELOAD = Content.Load<Texture2D>(@"arquebusier_reload");
            ARQUEBUSIER_SHOOT = Content.Load<Texture2D>(@"arquebusier_shoot");
            ARQUEBUSIER_SMOKE = Content.Load<Texture2D>(@"arquebusier_smoke");
            ARQUEBUSIER_DEATH = Content.Load<Texture2D>(@"arquebusier_death");
            ARQUEBUSIER_MELEE = Content.Load<Texture2D>(@"arquebusier_melee");
            ARQUEBUSIER_ROUTE = Content.Load<Texture2D>(@"arquebusier_route");
            ARQUEBUSIER_ROUTED = Content.Load<Texture2D>(@"arquebusier_routed");
            ARQUEBUSIER_SHOT1 = Content.Load<Texture2D>(@"shot1");
            ARQUEBUSIER_SHOT2 = Content.Load<Texture2D>(@"shot2");
            ARQUEBUSIER_SHOT3 = Content.Load<Texture2D>(@"shot3");
            ARQUEBUSIER_GROUND = Content.Load<Texture2D>(@"arquebusier_ground");

            CROSSBOWMAN_IDLE = Content.Load<Texture2D>(@"crossbowman_idle");
            CROSSBOWMAN_RELOAD = Content.Load<Texture2D>(@"crossbowman_reload");
            CROSSBOWMAN_RELOAD2 = Content.Load<Texture2D>(@"crossbowman_reload2");
            CROSSBOWMAN_SHOOT = Content.Load<Texture2D>(@"crossbowman_shoot");
            CROSSBOWMAN_DEATH = Content.Load<Texture2D>(@"crossbowman_death");
            CROSSBOWMAN_MELEE = Content.Load<Texture2D>(@"crossbowman_melee");
            CROSSBOWMAN_MELEE2 = Content.Load<Texture2D>(@"crossbowman_melee2");
            CROSSBOWMAN_DEFEND2 = Content.Load<Texture2D>(@"crossbowman_defend2");
            CROSSBOWMAN_BOLT = Content.Load<Texture2D>(@"crossbowman_bolt");
            CROSSBOWMAN_BOLT2 = Content.Load<Texture2D>(@"crossbowman_bolt2");
            CROSSBOWMAN_GROUND = Content.Load<Texture2D>(@"crossbowman_ground");
            CROSSBOWMAN_ROUTE = Content.Load<Texture2D>(@"crossbowman_route");
            CROSSBOWMAN_ROUTED = Content.Load<Texture2D>(@"crossbowman_routed");
            CROSSBOWMAN_PAVISE = Content.Load<Texture2D>(@"crossbowman_pavise_idle");
            CROSSBOWMAN_PAVISE_PLACE = Content.Load<Texture2D>(@"crossbowman_pavise_place");
            CROSSBOWMAN_SHIELDBREAK = Content.Load<Texture2D>(@"crossbowman_shieldbreak");

            PLACED_PAVISE = Content.Load<Texture2D>(@"placed_pavise");
            PAVISE_FALL = Content.Load<Texture2D>(@"pavise_fall");

            DOPPLE_DEATH = Content.Load<Texture2D>(@"dopple_death");
            DOPPLE_IDLE = Content.Load<Texture2D>(@"dopple_idle");
            DOPPLE_SWING1 = Content.Load<Texture2D>(@"dopple_swing1");
            DOPPLE_RELOAD1 = Content.Load<Texture2D>(@"dopple_reload1");
            DOPPLE_ROUTE = Content.Load<Texture2D>(@"dopple_route");
            DOPPLE_ROUTED = Content.Load<Texture2D>(@"dopple_routed");

            SLINGER_IDLE = Content.Load<Texture2D>(@"slinger_idle");
            SLINGER_DEATH = Content.Load<Texture2D>(@"slinger_death");
            SLINGER_MELEE = Content.Load<Texture2D>(@"slinger_melee2");
            SLINGER_DEFEND = Content.Load<Texture2D>(@"slinger_defend2");
            SLINGER_RELOAD = Content.Load<Texture2D>(@"slinger_reload");
            SLINGER_ROCK = Content.Load<Texture2D>(@"slinger_rock");
            SLINGER_SHOOT = Content.Load<Texture2D>(@"slinger_shoot");
            SLINGER_ROUTE = Content.Load<Texture2D>(@"slinger_route");
            SLINGER_ROUTED = Content.Load<Texture2D>(@"slinger_routed");
            SLINGER_RETREAT = Content.Load<Texture2D>(@"slinger_retreat");

            SKIRMISHER_IDLE = Content.Load<Texture2D>(@"skirmisher_idle");
            SKIRMISHER_RELOAD = Content.Load<Texture2D>(@"skirmisher_reload");
            SKIRMISHER_SHOOT = Content.Load<Texture2D>(@"skirmisher_shoot");
            SKIRMISHER_JAVELIN = Content.Load<Texture2D>(@"skirmisher_javelin");
            SKIRMISHER_GROUND = Content.Load<Texture2D>(@"skirmisher_ground");
            SKIRMISHER_DEATH = Content.Load<Texture2D>(@"skirmisher_death");
            SKIRMISHER_MELEE = Content.Load<Texture2D>(@"skirmisher_melee2");
            SKIRMISHER_DEFEND = Content.Load<Texture2D>(@"skirmisher_defend2");
            SKIRMISHER_RETREAT = Content.Load<Texture2D>(@"skirmisher_retreat");

            BERZERKER_IDLE = Content.Load<Texture2D>(@"gobraider1_idle");
            BERZERKER_DEATH = Content.Load<Texture2D>(@"gobraider1_death");
            BERZERKER_MELEE1 = Content.Load<Texture2D>(@"gobraider1_melee1");
            BERZERKER_DEFEND1 = Content.Load<Texture2D>(@"gobraider1_defend1");
            BERZERKER_MELEE2 = Content.Load<Texture2D>(@"gobraider1_melee2");
            BERZERKER_DEFEND2 = Content.Load<Texture2D>(@"gobraider1_defend2");
            BERZERKER_ROUTE = Content.Load<Texture2D>(@"beserker_route");
            BERZERKER_ROUTED = Content.Load<Texture2D>(@"beserker_routed");
            BERZERKER_IDLENOSHIELD = Content.Load<Texture2D>(@"gobraider1_idlenoshield");
            BERZERKER_SHIELDBREAK = Content.Load<Texture2D>(@"gobraider1_shieldbreak");
            BERZERKER_FALL = Content.Load<Texture2D>(@"gobraider1_fall");
            BERZERKER_CHARGENOSHIELD = Content.Load<Texture2D>(@"gobraider1_chargenoshield");
            BERZERKER_CHARGE = Content.Load<Texture2D>(@"gobraider1_charge");

            BERZERKER2_IDLE = Content.Load<Texture2D>(@"gobraider2_idle");
            BERZERKER2_DEATH = Content.Load<Texture2D>(@"gobraider2_death");
            BERZERKER2_MELEE1 = Content.Load<Texture2D>(@"gobraider2_melee1");
            BERZERKER2_DEFEND1 = Content.Load<Texture2D>(@"gobraider2_defend1");
            BERZERKER2_MELEE2 = Content.Load<Texture2D>(@"gobraider2_melee2");
            BERZERKER2_DEFEND2 = Content.Load<Texture2D>(@"gobraider2_defend2");
            BERZERKER2_ROUTE = Content.Load<Texture2D>(@"beserker_route");
            BERZERKER2_ROUTED = Content.Load<Texture2D>(@"beserker_routed");
            BERZERKER2_IDLENOSHIELD = Content.Load<Texture2D>(@"gobraider2_idlenoshield");
            BERZERKER2_SHIELDBREAK = Content.Load<Texture2D>(@"gobraider2_shieldbreak");
            BERZERKER2_FALL = Content.Load<Texture2D>(@"gobraider2_fall");
            BERZERKER2_CHARGENOSHIELD = Content.Load<Texture2D>(@"gobraider2_chargenoshield");
            BERZERKER2_CHARGE = Content.Load<Texture2D>(@"gobraider2_charge");

            BRIGAND1_IDLE = Content.Load<Texture2D>(@"berzerker_idle");
            BRIGAND1_DEATH = Content.Load<Texture2D>(@"bezerker_death");
            BRIGAND1_MELEE1 = Content.Load<Texture2D>(@"berserker_melee2");
            BRIGAND1_DEFEND1 = Content.Load<Texture2D>(@"berserker_defend2");
            BRIGAND1_CHARGE = Content.Load<Texture2D>(@"berserker_charge");

            BRIGAND2_IDLE = Content.Load<Texture2D>(@"brigand_idle");
            BRIGAND2_DEATH = Content.Load<Texture2D>(@"brigand_death");
            BRIGAND2_MELEE1 = Content.Load<Texture2D>(@"brigand_melee2");
            BRIGAND2_DEFEND1 = Content.Load<Texture2D>(@"brigand_defend2");
            BRIGAND2_CHARGE = Content.Load<Texture2D>(@"brigand_charge");

            HAULER_HAUL = Content.Load<Texture2D>(@"hauler_haul");

            WOLF_IDLE = Content.Load<Texture2D>(@"wolf_idle");
            WOLF_RUN = Content.Load<Texture2D>(@"wolf_run");
            WOLF_SPOOKED = Content.Load<Texture2D>(@"wolf_spooked");
            WOLF_TURN = Content.Load<Texture2D>(@"wolf_turn");
            WOLF_BITE = Content.Load<Texture2D>(@"wolf_bite");
            WOLF_MELEE = Content.Load<Texture2D>(@"wolf_melee");
            WOLF_DEFEND = Content.Load<Texture2D>(@"wolf_defend");
            WOLF_KILL = Content.Load<Texture2D>(@"wolf_kill");
            WOLF_HOWL = Content.Load<Texture2D>(@"wolf_howl");

            WOLF_IDLEg = getGreyscaleClone(WOLF_IDLE);
            WOLF_RUNg = getGreyscaleClone(WOLF_RUN);
            WOLF_SPOOKEDg = getGreyscaleClone(WOLF_SPOOKED);
            WOLF_TURNg = getGreyscaleClone(WOLF_TURN);
            WOLF_BITEg = getGreyscaleClone(WOLF_BITE);
            WOLF_MELEEg = getGreyscaleClone(WOLF_MELEE);
            WOLF_DEFENDg = getGreyscaleClone(WOLF_DEFEND);
            WOLF_KILLg = getGreyscaleClone(WOLF_KILL);
            WOLF_HOWLg = getGreyscaleClone(WOLF_HOWL);

            COLMILLOS_IDLE = Content.Load<Texture2D>(@"los_colmillos_idle0");
            COLMILLOS_IDLENOSHIELD = Content.Load<Texture2D>(@"los_colmillos_idle1");
            COLMILLOS_IDLENOARMOUR = Content.Load<Texture2D>(@"los_colmillos_idle2");
            COLMILLOS_SHIELDBREAK = Content.Load<Texture2D>(@"los_colmillos_shieldbreak");

            COLMILLOS_FALL = Content.Load<Texture2D>(@"los_colmillos_fall1");
            COLMILLOS_FALLNOSHIELD = Content.Load<Texture2D>(@"los_colmillos_fall2");
            COLMILLOS_ATTACK = Content.Load<Texture2D>(@"los_colmillos_attack");
            COLMILLOS_ATTACK2 = Content.Load<Texture2D>(@"los_colmillos_attack2");
            COLMILLOS_ATTACK3 = Content.Load<Texture2D>(@"los_colmillos_attack3");
            COLMILLOS_DEATH = Content.Load<Texture2D>(@"los_colmillos_death");
            COLMILLOS_HELMET = Content.Load<Texture2D>(@"helmet");
            COLMILLOS_RISE = Content.Load<Texture2D>(@"los_colmillos_rise");
            COLMILLOS_HOWL = Content.Load<Texture2D>(@"los_colmillos_howl");
            COLMILLOS_HOWL_NOSHIELD = Content.Load<Texture2D>(@"los_colmillos_howl_noshield");
            COLMILLOS_HOWL_NOARMOUR = Content.Load<Texture2D>(@"los_colmillos_howl_noarmour");

            GOBLIN_FEET = Content.Load<Texture2D>(@"goblin_feet");
            BROWN_FEET = Content.Load<Texture2D>(@"brown_feet");
            SLINGER_GROUND = Content.Load<Texture2D>(@"slinger_ground");

            COIN = Content.Load<Texture2D>(@"coin");
            COIN_METER = Content.Load<Texture2D>(@"coin_meter");
            COIN_METER_BACK = Content.Load<Texture2D>(@"coin_meter_back");
            LOOT = Content.Load<Texture2D>(@"loot");
            DOPPEL_METER = Content.Load<Texture2D>(@"doppel_meter");

            DOT = Content.Load<Texture2D>(@"dot");
            SWORD_POINTER = Content.Load<Texture2D>(@"sword_pointer");
            //TEST = Content.Load<Texture2D>(@"sfea");

            COIN_SPINNA = Content.Load<Texture2D>(@"coin_spinna");

            THEME_1 = Content.Load<Song>(@"theme");
            SHOT_0 = Content.Load<SoundEffect>(@"shot00");
            SHOT_1 = Content.Load<SoundEffect>(@"shot01");
            SHOT_2 = Content.Load<SoundEffect>(@"shot02");
            SHOT_3 = Content.Load<SoundEffect>(@"shot04");
            SHOT_4 = Content.Load<SoundEffect>(@"shot05");
            PIKES_LOWER = Content.Load<SoundEffect>(@"down").CreateInstance();
            PIKES_LOWER.Volume = 0.5f;
            PIKES_RAISE = Content.Load<SoundEffect>(@"drop").CreateInstance();
            PIKES_RAISE.Volume = 0.5f;
            SHOT_HIT = Content.Load<SoundEffect>(@"hit");
            ROCK_HIT = Content.Load<SoundEffect>(@"smack");
            SLING_ROCK = Content.Load<SoundEffect>(@"huck");
            OWW_ALLY = Content.Load<SoundEffect>(@"oww");
            OWW_ENEMY = Content.Load<SoundEffect>(@"bark");
            BODY_FALL = Content.Load<SoundEffect>(@"thud");
            CHARGE_ROAR = Content.Load<SoundEffect>(@"roar2");
            LOOT_SOUND = Content.Load<SoundEffect>(@"coin3");
            COIN_SOUND = Content.Load<SoundEffect>(@"coin2");
            SHIELD_BREAK = Content.Load<SoundEffect>(@"shield");
            PIKE_0 = Content.Load<SoundEffect>(@"pike1");
            PIKE_1 = Content.Load<SoundEffect>(@"pike2");
            PIKE_2 = Content.Load<SoundEffect>(@"pike3");
            PIKE_3 = Content.Load<SoundEffect>(@"pike4");
            PIKE_4 = Content.Load<SoundEffect>(@"pike5");
            PIKE_5 = Content.Load<SoundEffect>(@"pike6");
            MELEE_CLANG_0 = Content.Load<SoundEffect>(@"clang2");
            MELEE_CLANG_1 = Content.Load<SoundEffect>(@"clang3");
            MELEE_CLANG_2 = Content.Load<SoundEffect>(@"clang4");
            SLASH = Content.Load<SoundEffect>(@"slash");
            GAME_OVER = Content.Load<SoundEffect>(@"go");
            POWER_UP = Content.Load<SoundEffect>(@"loaded");
            DOPPEL_DOWN = Content.Load<SoundEffect>(@"downbeat");
            DOPPEL_UP = Content.Load<SoundEffect>(@"loot_sound");

            _gameScreens = new ArrayList(3);

            // MAKE LEVELS
            List<Level> levels = new List<Level>(32);
            FileStream stream;
            LevelPipeline.LevelContent levelContent;
            XmlReaderSettings settings = new XmlReaderSettings();
            String[] levelFiles = Directory.GetFiles(@"Content\", @"*_level.xml");

            foreach (String filename in levelFiles)
            {
                stream = new FileStream(filename, FileMode.Open);
                using (XmlReader xmlReader = XmlReader.Create(stream, settings))
                {
                    levelContent = IntermediateSerializer.Deserialize<LevelPipeline.LevelContent>(xmlReader, null);
                }
                stream.Close();
                levels.Add(new Level(levelContent));
            }

            // PLAY LEVEL
            _currScreen = new LevelScreen(this, levels.ElementAt(0));
            _gameScreens.Add(_currScreen);

            // MAKE FORMATION
            //_gameScreens.Add(new FormationEditorScreen(this));
            //_form = new LevelConstructorForm(levels);
            //_gameScreens.Add( new LevelEditorScreen(this, _form));
            //_form.addFormListener((FormListener)_gameScreens[SCREEN_LEVELEDITOR]);
            //_form.addFormListener((LevelScreen)_currScreen);
        }
Пример #23
0
        public static void getNewSoldier(int soldierClass, BattleScreen screen, Formation _newEnemyFormation, float x, float y)
        {
            switch (soldierClass)
            {
                case Soldier.CLASS_MERC_PIKEMAN:
                    _newEnemyFormation.addSoldier(new Pikeman(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_MERC_ARQUEBUSIER:
                    _newEnemyFormation.addSoldier(new Arquebusier(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_MERC_CROSSBOWMAN:
                    _newEnemyFormation.addSoldier(new Crossbowman(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_MERC_SOLDIER:
                    _newEnemyFormation.addSoldier(new Targeteer(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_GOBLIN_SLINGER:
                    _newEnemyFormation.addSoldier(new Slinger(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_MERC_DOPPLE:
                    _newEnemyFormation.addSoldier(new Dopple(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_GOBLIN_BERZERKER:
                    _newEnemyFormation.addSoldier(new Berzerker(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_GOBLIN_BRIGAND:
                    _newEnemyFormation.addSoldier(new Brigand(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_MERC_CROSSBOWMAN_PAVISE:
                    _newEnemyFormation.addSoldier(new CrossbowmanPavise(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_MERC_CAVALRY:
                    _newEnemyFormation.addSoldier(new Cavalry(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_GOBLIN_WOLF:
                    _newEnemyFormation.addSoldier(new Wolf(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;
                case Soldier.CLASS_NPC_FLEER:
                    _newEnemyFormation.addSoldier(new NPCFleer(screen, x, y, BattleScreen.SIDE_ENEMY));
                    break;

            }
        }
Пример #24
0
        public Hauler(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_GOBLIN_BRIGAND;

            _feet = new Sprite(PikeAndShotGame.BROWN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);

            _idle = new Sprite(PikeAndShotGame.HAULER_HAUL, new Rectangle(6, 6, 16, 28), 40, 42);
            _death = new Sprite(PikeAndShotGame.BRIGAND2_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
            _melee1 = new Sprite(PikeAndShotGame.BRIGAND2_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
            _defend1 = new Sprite(PikeAndShotGame.BRIGAND2_DEFEND1, new Rectangle(20, 2, 16, 28), 52, 40);
            _route = new Sprite(PikeAndShotGame.BERZERKER2_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
            _routed = new Sprite(PikeAndShotGame.BERZERKER2_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);
            _charge = new Sprite(PikeAndShotGame.BRIGAND2_CHARGE, new Rectangle(20, 20, 16, 28), 60, 56);

            _body = _idle;

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
        }
Пример #25
0
        public Cavalry(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_CAVALRY;
            _class = Soldier.CLASS_MERC_CAVALRY;

            _stand = new Sprite(PikeAndShotGame.CAVALRY_HORSE_IDLE, new Rectangle(24, 24, 38, 24), 88, 60);
            _run = new Sprite(PikeAndShotGame.CAVALRY_HORSE_RUN, new Rectangle(24, 24, 38, 24), 88, 60, true);
            _halt = new Sprite(PikeAndShotGame.CAVALRY_HORSE_HALT, new Rectangle(24, 24, 38, 24), 88, 60);
            _turn = new Sprite(PikeAndShotGame.CAVALRY_HORSE_TURN, new Rectangle(80, 16, 38, 24), 152, 52);
            _death = new Sprite(PikeAndShotGame.CAVALRY_HORSE_DEATH, new Rectangle(46, 23, 38, 24), 100, 64);

            _leftFoot = new Sprite(PikeAndShotGame.CAVALRY_LEFTFOOT, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _rightFoot = new Sprite(PikeAndShotGame.CAVALRY_RIGHTFOOT, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _leftIdle = new Sprite(PikeAndShotGame.CAVALRY_LEFTIDLE, new Rectangle(10, 40, 16, 28), 36, 76);
            _rightIdle = new Sprite(PikeAndShotGame.CAVALRY_RIGHTIDLE, new Rectangle(10, 40, 16, 28), 36, 76);
            _leftLower = new Sprite(PikeAndShotGame.CAVALRY_LEFTLOWER, new Rectangle(10, 40, 16, 28), 90, 78);
            _rightLower = new Sprite(PikeAndShotGame.CAVALRY_RIGHTLOWER, new Rectangle(10, 40, 16, 28), 36, 78);
            _leftRecoil = new Sprite(PikeAndShotGame.CAVALRY_LEFTRECOIL, new Rectangle(12, 2, 16, 28), 86, 52);
            _rightRecoil = new Sprite(PikeAndShotGame.CAVALRY_RIGHTRECOIL, new Rectangle(12, 2, 16, 28), 86, 52);

            _leftBody = _leftIdle;
            _rightBody = _rightIdle;
            _feet = _stand;
            _speed = 0.22f;
            _turned = false;
            _attackTime = 450f;
            _reloadTime = 600f;
            _guardPositionOffset = new Vector2(0f, -14);

            _run.setAnimationSpeed(15f / _speed);
            _leftFoot.setAnimationSpeed(15f / _speed);
            _rightFoot.setAnimationSpeed(15f / _speed);
            _haltTime = 1000f;
            _turnTime = 750f;
            _stoppingDistance = 100f;
            _turningDistance = 40f;
            _turningOffset = Vector2.Zero;

            _lanceTip = new LanceTip(screen, this);
            _threwRider = false;
        }
Пример #26
0
        public Brigand(BattleScreen screen, float x, float y, int side)
            : base(screen, side, x, y)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_GOBLIN_BRIGAND;

            chargeVariant = PikeAndShotGame.random.Next(2);

            _feet = new Sprite(PikeAndShotGame.BROWN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            if (PikeAndShotGame.random.Next(51) > 25)
            {
                variant = true;
                _idle = new Sprite(PikeAndShotGame.BRIGAND2_IDLE, new Rectangle(10, 2, 16, 28), 46, 42);
                _death = new Sprite(PikeAndShotGame.BRIGAND2_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
                _melee1 = new Sprite(PikeAndShotGame.BRIGAND2_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend1 = new Sprite(PikeAndShotGame.BRIGAND2_DEFEND1, new Rectangle(20, 4, 16, 28), 54, 40);
                _route = new Sprite(PikeAndShotGame.BERZERKER2_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
                _routed = new Sprite(PikeAndShotGame.BERZERKER2_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);
                _charge = new Sprite(PikeAndShotGame.BRIGAND2_CHARGE, new Rectangle(20, 20, 16, 28), 60, 56);
            }
            else
            {
                variant = false;
                _idle = new Sprite(PikeAndShotGame.BRIGAND1_IDLE, new Rectangle(10, 2, 16, 28), 46, 42);
                _death = new Sprite(PikeAndShotGame.BRIGAND1_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
                _melee1 = new Sprite(PikeAndShotGame.BRIGAND1_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend1 = new Sprite(PikeAndShotGame.BRIGAND1_DEFEND1, new Rectangle(24, 4, 16, 28), 60, 40);
                _route = new Sprite(PikeAndShotGame.BERZERKER_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
                _routed = new Sprite(PikeAndShotGame.BERZERKER_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);
                _charge = new Sprite(PikeAndShotGame.BRIGAND1_CHARGE, new Rectangle(20, 20, 16, 28), 60, 56);
            }

            _body = _idle;

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            hitSound = PikeAndShotGame.OWW_ENEMY.CreateInstance();
            hitSound.Volume = 0.25f;
        }
Пример #27
0
        public Berzerker(BattleScreen screen, float x, float y, int side)
            : base(screen, x, y, side)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_GOBLIN_BERZERKER;

            _feet = new Sprite(PikeAndShotGame.BROWN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            if (PikeAndShotGame.random.Next(51) > 25)
            {
                _idle = new Sprite(PikeAndShotGame.BERZERKER2_IDLE, new Rectangle(10, 2, 16, 28), 46, 42);
                _death = new Sprite(PikeAndShotGame.BERZERKER2_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
                _melee1 = new Sprite(PikeAndShotGame.BERZERKER2_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend1 = new Sprite(PikeAndShotGame.BERZERKER2_DEFEND1, new Rectangle(20, 2, 16, 28), 52, 40);
                _route = new Sprite(PikeAndShotGame.BERZERKER2_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
                _routed = new Sprite(PikeAndShotGame.BERZERKER2_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);
                _noshieldIdle = new Sprite(PikeAndShotGame.BERZERKER2_IDLENOSHIELD, new Rectangle(10, 2, 16, 28), 46, 42);
                _shieldBreak = new Sprite(PikeAndShotGame.BERZERKER2_SHIELDBREAK, new Rectangle(24, 4, 16, 28), 60, 46);
                _shieldFall = new Sprite(PikeAndShotGame.BERZERKER2_FALL, new Rectangle(76, 42, 16, 18), 110, 86);
                _melee2 = new Sprite(PikeAndShotGame.BERZERKER2_MELEE2, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend2 = new Sprite(PikeAndShotGame.BERZERKER2_DEFEND2, new Rectangle(20, 2, 16, 28), 52, 40);
                _chargeNoShield = new Sprite(PikeAndShotGame.BERZERKER2_CHARGENOSHIELD, new Rectangle(20, 20, 16, 28), 60, 56);
                _charge = new Sprite(PikeAndShotGame.BERZERKER2_CHARGE, new Rectangle(20, 20, 16, 28), 60, 56);
            }
            else
            {
                _idle = new Sprite(PikeAndShotGame.BERZERKER_IDLE, new Rectangle(10, 2, 16, 28), 46, 42);
                _death = new Sprite(PikeAndShotGame.BERZERKER_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
                _melee1 = new Sprite(PikeAndShotGame.BERZERKER_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend1 = new Sprite(PikeAndShotGame.BERZERKER_DEFEND1, new Rectangle(20, 2, 16, 28), 52, 40);
                _route = new Sprite(PikeAndShotGame.BERZERKER_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
                _routed = new Sprite(PikeAndShotGame.BERZERKER_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);
                _noshieldIdle = new Sprite(PikeAndShotGame.BERZERKER_IDLENOSHIELD, new Rectangle(10, 2, 16, 28), 46, 42);
                _shieldBreak = new Sprite(PikeAndShotGame.BERZERKER_SHIELDBREAK, new Rectangle(24, 4, 16, 28), 60, 46);
                _shieldFall = new Sprite(PikeAndShotGame.BERZERKER_FALL, new Rectangle(76, 42, 16, 18), 110, 86);
                _melee2 = new Sprite(PikeAndShotGame.BERZERKER_MELEE2, new Rectangle(24, 30, 16, 28), 64, 68);
                _defend2 = new Sprite(PikeAndShotGame.BERZERKER_DEFEND2, new Rectangle(20, 2, 16, 28), 52, 40);
                _chargeNoShield = new Sprite(PikeAndShotGame.BERZERKER_CHARGENOSHIELD, new Rectangle(20, 20, 16, 28), 60, 56);
                _charge = new Sprite(PikeAndShotGame.BERZERKER_CHARGE, new Rectangle(20, 20, 16, 28), 60, 56);
            }

            _body = _idle;

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            hitSound = PikeAndShotGame.OWW_ENEMY.CreateInstance();
            hitSound.Volume = 0.25f;
        }
Пример #28
0
        public Colmillos(BattleScreen screen, float x, float y, int side)
            : base(screen, x, y, side)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_GOBLIN_COLMILLOS;
            _attackTime = 1800f;
            _deathTime = 2000f;

            _feet = new Sprite(PikeAndShotGame.BROWN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _idle = new Sprite(PikeAndShotGame.COLMILLOS_IDLE, new Rectangle(20, 4, 16, 28), 54, 42);
            _death = new Sprite(PikeAndShotGame.COLMILLOS_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
            _melee1 = new Sprite(PikeAndShotGame.BERZERKER2_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
            _defend1 = new Sprite(PikeAndShotGame.BERZERKER2_DEFEND1, new Rectangle(20, 2, 16, 28), 52, 40);
            _route = new Sprite(PikeAndShotGame.BERZERKER2_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
            _routed = new Sprite(PikeAndShotGame.BERZERKER2_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);
            _noshieldIdle = new Sprite(PikeAndShotGame.COLMILLOS_IDLENOSHIELD, new Rectangle(20, 4, 16, 28), 54, 42);
            _attack = new Sprite(PikeAndShotGame.COLMILLOS_ATTACK, new Rectangle(12, 14, 16, 28), 78, 52);
            _noShieldAttack = new Sprite(PikeAndShotGame.COLMILLOS_ATTACK2, new Rectangle(22, 12, 16, 28), 98, 50);
            _noArmourAttack = new Sprite(PikeAndShotGame.COLMILLOS_ATTACK3, new Rectangle(14, 22, 16, 28), 114, 60);
            _noArmourIdle = new Sprite(PikeAndShotGame.COLMILLOS_IDLENOARMOUR, new Rectangle(20, 4, 16, 28), 54, 42);
            _shieldBreak = new Sprite(PikeAndShotGame.COLMILLOS_SHIELDBREAK, new Rectangle(24, 4, 16, 28), 60, 46);
            _shieldFall = new Sprite(PikeAndShotGame.COLMILLOS_FALL, new Rectangle(76, 42, 16, 18), 110, 86);
            _armourFall = new Sprite(PikeAndShotGame.COLMILLOS_FALLNOSHIELD, new Rectangle(76, 42, 16, 18), 110, 86);
            _rise = new Sprite(PikeAndShotGame.COLMILLOS_RISE, new Rectangle(40, 2, 16, 28), 72, 40);
            _howl = new Sprite(PikeAndShotGame.COLMILLOS_HOWL, new Rectangle(12, 10, 16, 28), 50, 54);
            _noShieldHowl = new Sprite(PikeAndShotGame.COLMILLOS_HOWL_NOSHIELD, new Rectangle(20, 12, 16, 28), 56, 44);
            _noArmourHowl = new Sprite(PikeAndShotGame.COLMILLOS_HOWL_NOARMOUR, new Rectangle(16, 22, 16, 28), 52, 58);
            _body = _idle;
            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            hitSound = chargeSound;

            hasArmour = true;
        }
Пример #29
0
        public Colmillos(BattleScreen screen, float x, float y, int side)
            : base(screen, x, y, side)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_GOBLIN_COLMILLOS;
            _attackTime = 1800f;
            _deathTime = 2000f;
            hurtTimer = 0f;
            health = HEALTH;

            _feet = new Sprite(PikeAndShotGame.BROWN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true,true);
            _feet.flashable = false;
            _idle = new Sprite(PikeAndShotGame.COLMILLOS_IDLE, new Rectangle(20, 4, 16, 28), 54, 42,false,true);
            _idle.flashable = false;
            _death = new Sprite(PikeAndShotGame.COLMILLOS_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
            _melee1 = new Sprite(PikeAndShotGame.BERZERKER2_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
            _defend1 = new Sprite(PikeAndShotGame.BERZERKER2_DEFEND1, new Rectangle(20, 2, 16, 28), 52, 40);
            _route = new Sprite(PikeAndShotGame.BERZERKER2_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
            _routed = new Sprite(PikeAndShotGame.BERZERKER2_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);
            _noshieldIdle = new Sprite(PikeAndShotGame.COLMILLOS_IDLENOSHIELD, new Rectangle(20, 4, 16, 28), 54, 42,false,true);
            _noshieldIdle.flashable = false;
            _attack = new Sprite(PikeAndShotGame.COLMILLOS_ATTACK, new Rectangle(12, 14, 16, 28), 78, 52, false, true);
            _attack.flashable = false;
            _noShieldAttack = new Sprite(PikeAndShotGame.COLMILLOS_ATTACK2, new Rectangle(22, 12, 16, 28), 98, 50, false, true);
            _noShieldAttack.flashable = false;
            _noArmourAttack = new Sprite(PikeAndShotGame.COLMILLOS_ATTACK3, new Rectangle(14, 22, 16, 28), 114, 60, false, true);
            _noArmourAttack.flashable = false;
            _noArmourIdle = new Sprite(PikeAndShotGame.COLMILLOS_IDLENOARMOUR, new Rectangle(20, 4, 16, 28), 54, 42, false, true);
            _noArmourIdle.flashable = false;
            _shieldBreak = new Sprite(PikeAndShotGame.COLMILLOS_SHIELDBREAK, new Rectangle(24, 4, 16, 28), 60, 46,false, true);
            _shieldBreak.flashable = false;
            _shieldFall = new Sprite(PikeAndShotGame.COLMILLOS_FALL, new Rectangle(76, 42, 16, 18), 110, 86,false,true);
            _shieldFall.flashable = false;
            _armourFall = new Sprite(PikeAndShotGame.COLMILLOS_FALLNOSHIELD, new Rectangle(76, 42, 16, 18), 110, 86,false,true);
            _armourFall.flashable = false;
            _rise = new Sprite(PikeAndShotGame.COLMILLOS_RISE, new Rectangle(40, 2, 16, 28), 72, 40,false, true);
            _rise.flashable = false;
            _howl = new Sprite(PikeAndShotGame.COLMILLOS_HOWL, new Rectangle(12, 10, 16, 28), 50, 54,false,true);
            _howl.flashable = false;
            _noShieldHowl = new Sprite(PikeAndShotGame.COLMILLOS_HOWL_NOSHIELD, new Rectangle(20, 12, 16, 28), 56, 44, false, true);
            _noShieldHowl.flashable = false;
            _noArmourHowl = new Sprite(PikeAndShotGame.COLMILLOS_HOWL_NOARMOUR, new Rectangle(16, 22, 16, 28), 52, 58, false, true);
            _noArmourHowl.flashable = false;
            _stagger = new Sprite(PikeAndShotGame.COLMILLOS_STAGGER, new Rectangle(10, 18, 16, 28), 46, 58, false, true);
            _stagger.flashable = false;
            _body = _idle;
            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            hitSound = chargeSound;

            hasArmour = true;
            _speed = 0.4f;
            _weaponSwing = new WeaponSwing(_screen, this);
            _screen.removeScreenObject(_weaponSwing);
            hurtSound = PikeAndShotGame.COLMILLOS_HURT.CreateInstance();
            yellSound = PikeAndShotGame.COLMILLOS_YELL.CreateInstance();
            slash = PikeAndShotGame.SLASH.CreateInstance();
        }
Пример #30
0
        public DismountedCavalry(BattleScreen screen, float x, float y, int side)
            : base(screen, x, y, side)
        {
            _type = Soldier.TYPE_MELEE;
            _class = Soldier.CLASS_GOBLIN_BERZERKER;

            _feet = new Sprite(PikeAndShotGame.PIKEMAN_FEET, new Rectangle(4, 2, 16, 12), 26, 16, true);
            _idle = new Sprite(PikeAndShotGame.DISMOUNTED_CAVALRY_IDLE, new Rectangle(10, 2, 16, 28), 46, 42);
            _death = new Sprite(PikeAndShotGame.DISMOUNTED_CAVALRY_DEATH, new Rectangle(40, 2, 16, 28), 72, 40);
            _melee1 = new Sprite(PikeAndShotGame.SOLDIER_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
            _defend1 = new Sprite(PikeAndShotGame.SOLDIER_DEFEND1, new Rectangle(20, 2, 16, 28), 52, 40);
            _route = new Sprite(PikeAndShotGame.BERZERKER_ROUTE, new Rectangle(12, 10, 16, 28), 40, 46);
            _routed = new Sprite(PikeAndShotGame.BERZERKER_ROUTED, new Rectangle(12, 10, 16, 28), 40, 46, true);
            _fall = new Sprite(PikeAndShotGame.CAVALRY_FALL, new Rectangle(76, 42, 16, 18), 110, 86);
            _noshieldIdle = new Sprite(PikeAndShotGame.DISMOUNTED_CAVALRY_IDLENOSHIELD, new Rectangle(10, 2, 16, 28), 46, 42);
            _shieldBreak = new Sprite(PikeAndShotGame.DISMOUNTED_CAVALRY_SHIELDBREAK, new Rectangle(24, 4, 16, 28), 60, 46);
            _shieldFall = new Sprite(PikeAndShotGame.DISMOUNTED_CAVALRY_FALL, new Rectangle(76, 42, 16, 18), 110, 86);
            _melee1 = new Sprite(PikeAndShotGame.DISMOUNTED_CAVALRY_MELEE1, new Rectangle(24, 30, 16, 28), 64, 68);
            _defend1 = new Sprite(PikeAndShotGame.DISMOUNTED_CAVALRY_DEFEND1, new Rectangle(20, 2, 16, 28), 52, 40);

            _body = _idle;

            _feet.setAnimationSpeed(_footSpeed / 0.11f);
            _fallTime = 1500f;
        }