Exemplo n.º 1
0
        public override void Create()
        {
            base.Create();
            BoundingBox = new Rectangle((int)(-13 * baseScale), (int)(-37 * baseScale),
                                        (int)(26 * baseScale), (int)(50 * baseScale));
            SpeedOnHit = new Vector2(3, -2);
            HitPoints = 120;
            Damage = 5; //Damage of the monster itself

            SpriteScale = 0.2f * baseScale;

            //animation rig
            body = new AnimationBone(this, new Vector2(0, -8 * baseScale));
            head = new AnimationBone(body, new Vector2(0, -30 * baseScale)) { DepthOffset = -2 };
            hipLeft = new AnimationBone(body, new Vector2(6 * baseScale, 4 * baseScale)) { DepthOffset = 2 };
            kneeLeft = new AnimationBone(hipLeft, new Vector2(0, 8 * baseScale)) { DepthOffset = -1 };
            hipRight = new AnimationBone(body, new Vector2(-6 * baseScale, 4 * baseScale)) { DepthOffset = 1 };
            kneeRight = new AnimationBone(hipRight, new Vector2(0, 8 * baseScale)) { DepthOffset = -1 };

            shoulderLeft = new AnimationBone(body, new Vector2(8 * baseScale, -24 * baseScale)) { DepthOffset = 2 };
            elbowLeft = new AnimationBone(shoulderLeft, new Vector2(13 * baseScale, 0)) { DepthOffset = -1 };
            shoulderRight = new AnimationBone(body, new Vector2(-8 * baseScale, -24 * baseScale)) { DepthOffset = -1 };
            elbowRight = new AnimationBone(shoulderRight, new Vector2(-13 * baseScale, 0)) { DepthOffset = -1 };
            gun = new AnimationBone(elbowRight, new Vector2(-10 * baseScale, 0)) { DepthOffset = 1 };
            gunNuzzle = new AnimationBone(gun, new Vector2(15 * baseScale, -5 * baseScale));

            World.AddObject(body);
            body.SetSprite("Boss/Body");
            World.AddObject(head);
            head.SetSprite("Boss/Head");
            World.AddObject(hipLeft);
            hipLeft.SetSprite("Boss/LegL1");
            World.AddObject(kneeLeft);
            kneeLeft.SetSprite("Boss/LegL2");
            World.AddObject(hipRight);
            hipRight.SetSprite("Boss/LegR1");
            World.AddObject(kneeRight);
            kneeRight.SetSprite("Boss/LegR2");

            World.AddObject(shoulderLeft);
            shoulderLeft.SetSprite("Boss/ArmL1");
            World.AddObject(elbowLeft);
            elbowLeft.SetSprite("Boss/ArmL2");
            World.AddObject(shoulderRight);
            shoulderRight.SetSprite("Boss/ArmR1");
            World.AddObject(elbowRight);
            elbowRight.SetSprite("Boss/ArmR2");
            World.AddObject(gun);
            gun.SetSprite("Boss/Gun");
            World.AddObject(gunNuzzle);

            State = MonsterState.ChangeState;
            StateTimer = 60;

            Gravity = 0.2f;

            startingPos = Position;
        }
Exemplo n.º 2
0
        public override void Create()
        {
            base.Create();
            BoundingBox = new Rectangle(-13, -27, 26, 40);
            SpeedOnHit = new Vector2(3, -2);
            HitPoints = 5;
            Damage = 5; //Damage of the monster itself

            SpriteScale = 0.2f;

            //animation rig
            body = new AnimationBone(this, new Vector2(0, -8));
            head = new AnimationBone(body, new Vector2(3, -28));
            hipLeft = new AnimationBone(body, new Vector2(6, 0)) { DepthOffset = 2 };
            kneeLeft = new AnimationBone(hipLeft, new Vector2(0, 8)) { DepthOffset = -1 };
            hipRight = new AnimationBone(body, new Vector2(-6, 0)) { DepthOffset = 1 };
            kneeRight = new AnimationBone(hipRight, new Vector2(0, 8)) { DepthOffset = -1 };

            shoulderLeft = new AnimationBone(body, new Vector2(6, -20));
            elbowLeft = new AnimationBone(shoulderLeft, new Vector2(16, 0));
            shoulderRight = new AnimationBone(body, new Vector2(-6, -20));
            elbowRight = new AnimationBone(shoulderRight, new Vector2(-16, 0));
            gun = new AnimationBone(elbowRight, new Vector2(-10, 0)) { DepthOffset = -1 };
            gunNuzzle = new AnimationBone(gun, new Vector2(15, -5)) { DepthOffset = -1 };

            World.AddObject(body);
            body.SetSprite("Enemy1/Body");
            World.AddObject(head);
            head.SetSprite("Enemy1/Head");
            World.AddObject(hipLeft);
            hipLeft.SetSprite("Enemy1/LLeg");
            World.AddObject(kneeLeft);
            kneeLeft.SetSprite("Enemy1/LFoot");
            World.AddObject(hipRight);
            hipRight.SetSprite("Enemy1/RLeg");
            World.AddObject(kneeRight);
            kneeRight.SetSprite("Enemy1/RFoot");

            World.AddObject(shoulderLeft);
            shoulderLeft.SetSprite("Enemy1/LArm1");
            World.AddObject(elbowLeft);
            elbowLeft.SetSprite("Enemy1/LArm2");
            World.AddObject(shoulderRight);
            shoulderRight.SetSprite("Enemy1/RArm1");
            World.AddObject(elbowRight);
            elbowRight.SetSprite("Enemy1/RArm2");
            World.AddObject(gun);
            gun.SetSprite("Enemy1/Enemygun");
            World.AddObject(gunNuzzle);

            State = MonsterState.ChangeState;
            StateTimer = 60;

            Gravity = 0.2f;

            startingPos = Position;
        }
Exemplo n.º 3
0
        public override void Create()
        {
            BaseSpeed = 0.5f; //This monster is quite fast

            base.Create();
            BoundingBox = new Rectangle(-13, -30, 26, 36);
            SpeedOnHit = new Vector2(2, -1);
            HitPoints = 7;
            Damage = AttackDamage;

            SpriteScale = 0.15f;

            //animation rig
            legs = new AnimationBone(this, new Vector2(6, 0)) { DepthOffset = 2 };
            body = new AnimationBone(legs, new Vector2(-6, 0));
            headLeft = new AnimationBone(body, new Vector2(10, -22)) { DepthOffset = 1 };
            headRight = new AnimationBone(body, new Vector2(1, -22)) { DepthOffset = 1 };

            shoulderLeft = new AnimationBone(body, new Vector2(12, -17)) { DepthOffset = 1 };
            elbowLeft = new AnimationBone(shoulderLeft, new Vector2(13, 0)) { DepthOffset = 1 };
            shoulderRight = new AnimationBone(body, new Vector2(-2, -17)) { DepthOffset = -2 };
            elbowRight = new AnimationBone(shoulderRight, new Vector2(-13, 0)) { DepthOffset = 1 };

            World.AddObject(body);
            body.SetSprite("Enemy2/Body");
            World.AddObject(headLeft);
            headLeft.SetSprite("Enemy2/LHead");
            World.AddObject(headRight);
            headRight.SetSprite("Enemy2/RHead");
            World.AddObject(legs);
            legs.SetSprite("Enemy2/Legs");

            World.AddObject(shoulderLeft);
            shoulderLeft.SetSprite("Enemy2/LArm1");
            World.AddObject(elbowLeft);
            elbowLeft.SetSprite("Enemy2/LArm2");
            World.AddObject(shoulderRight);
            shoulderRight.SetSprite("Enemy2/RArm1");
            World.AddObject(elbowRight);
            elbowRight.SetSprite("Enemy2/RArm2");

            State = MonsterState.ChangeState;
            StateTimer = 60;

            Gravity = 0.2f;

            startingPos = Position;

            Depth = -10;
        }
Exemplo n.º 4
0
        public override void Create()
        {
            BaseSpeed = 0.2f; //This monster is a bit slower
            JumpSpeed = 5f; //It can't jump very high.
            AvgJumpWaitTime = 40; //It doesn't jump very often, either.

            //It drops less ammo and scrap.
            AmmoDropModifier = 0.5f;
            ScrapDropModifier = 0.5f;

            base.Create();
            BoundingBox = new Rectangle(-20, -20, 40, 23);
            SpeedOnHit = new Vector2(2, -1);
            HitPoints = 9; //The monster has some more hitpoints than others.
            Damage = AttackDamage;

            SpriteScale = 0.15f;

            //animation rig
            body = new AnimationBone(this, new Vector2(0, 0));
            eyeLeft = new AnimationBone(body, new Vector2(10, -13));
            eyeRight = new AnimationBone(body, new Vector2(0, -13));

            World.AddObject(body);
            body.SetSprite("Enemy3/Body");
            World.AddObject(eyeLeft);
            eyeLeft.SetSprite("Enemy3/LEye");
            World.AddObject(eyeRight);
            eyeRight.SetSprite("Enemy3/REye");

            State = MonsterState.ChangeState;
            StateTimer = 60;

            Gravity = 0.2f;

            startingPos = Position;

            Depth = -10;
        }
Exemplo n.º 5
0
        public override void Create()
        {
            base.Create();
            BoundingBox = new Rectangle(-10, -16, 20, 30);
            Depth = -10;
            SpriteScale = 0.07f;
            //make skeleton
            body = new AnimationBone(this, new Vector2(0, -1));
            head = new AnimationBone(body, new Vector2(0, -16));
            hipLeft = new AnimationBone(body, new Vector2(-5, -1)) { DepthOffset = 1 };
            hipRight = new AnimationBone(body, new Vector2(5, -1)) { DepthOffset = 1 };
            kneeLeft = new AnimationBone(hipLeft, new Vector2(0, 7)) { DepthOffset = 1 };
            kneeRight = new AnimationBone(hipRight, new Vector2(0, 7)) { DepthOffset = 1 };
            footLeft = new AnimationBone(kneeLeft, new Vector2(0, 7));
            footRight = new AnimationBone(kneeRight, new Vector2(0, 7));

            shoulderRight = new AnimationBone(body, new Vector2(-5.5f, -13f)) { DepthOffset = -3 };
            shoulderLeft = new AnimationBone(body, new Vector2(5.5f, -13)) { DepthOffset = 1 };
            elbowRight = new AnimationBone(shoulderRight, new Vector2(-8, 0));
            elbowLeft = new AnimationBone(shoulderLeft, new Vector2(8, 0)) { DepthOffset = 1 };
            handRight = new AnimationBone(elbowRight, new Vector2(-7, 0)) { DepthOffset = 1 };
            handLeft = new AnimationBone(elbowLeft, new Vector2(7, 0)) { DepthOffset = 1 };

            gun = new AnimationBone(handRight, new Vector2(-2, 0)) { DepthOffset = -4 };
            gunNuzzle = new AnimationBone(gun, new Vector2(20, -4));
            launcher = new AnimationBone(handRight, new Vector2(-2, 0)) { DepthOffset = -4 };
            launcherNuzzle = new AnimationBone(launcher, new Vector2(30, -12));
            wrench = new AnimationBone(handLeft, new Vector2(2, 0)) { DepthOffset = 1 };

            antennaLeft1 = new AnimationBone(head, new Vector2(3, -18)) { DepthOffset = -1 };
            antennaLeft2 = new AnimationBone(antennaLeft1, new Vector2(0, -6)) { DepthOffset = 1 };
            antennaRight1 = new AnimationBone(head, new Vector2(-3, -17)) { DepthOffset = -1 };
            antennaRight2 = new AnimationBone(antennaRight1, new Vector2(0, -6)) { DepthOffset = 1 };

            World.AddObject(body);
            body.SetSprite("Robot/RobotSpriteBody");
            World.AddObject(head);
            head.SetSprite("Robot/RobotSpriteHead");

            World.AddObject(hipLeft);
            hipLeft.SetSprite("Robot/RobotSpriteLLeg1");
            World.AddObject(hipRight);
            hipRight.SetSprite("Robot/RobotSpriteRLeg1");
            World.AddObject(kneeLeft);
            kneeLeft.SetSprite("Robot/RobotSpriteLLeg2");
            World.AddObject(kneeRight);
            kneeRight.SetSprite("Robot/RobotSpriteRLeg2");
            World.AddObject(footLeft);
            footLeft.SetSprite("Robot/RobotSpriteLFoot");
            World.AddObject(footRight);
            footRight.SetSprite("Robot/RobotSpriteRFoot");

            World.AddObject(shoulderLeft);
            shoulderLeft.SetSprite("Robot/RobotSpriteLArm2");
            World.AddObject(shoulderRight);
            shoulderRight.SetSprite("Robot/RobotSpriteRArm2");
            World.AddObject(elbowLeft);
            elbowLeft.SetSprite("Robot/RobotSpriteLArm1");
            World.AddObject(elbowRight);
            elbowRight.SetSprite("Robot/RobotSpriteRArm1");
            World.AddObject(handLeft);
            handLeft.SetSprite("Robot/RobotSpriteLHand");
            World.AddObject(handRight);
            handRight.SetSprite("Robot/RobotSpriteRHand");

            World.AddObject(gun);
            gun.SetSprite("Items/gun");
            gun.SpriteScale = 0.2f;
            World.AddObject(gunNuzzle);

            World.AddObject(launcher);
            launcher.SetSprite("Items/playerrocket");
            launcher.SpriteScale = 0.2f;
            World.AddObject(launcherNuzzle);

            World.AddObject(wrench);
            wrench.SetSprite("Items/wrench");
            wrench.SpriteScale = 0.2f;
            wrench.TargetRotation = -90f;

            World.AddObject(antennaLeft1);
            antennaLeft1.SetSprite("Robot/RobotSpriteLAntennae1");
            antennaLeft1.TargetRotation = 5;
            World.AddObject(antennaLeft2);
            antennaLeft2.SetSprite("Robot/RobotSpriteLAntennae2");

            World.AddObject(antennaRight1);
            antennaRight1.SetSprite("Robot/RobotSpriteRAntennae1");
            antennaRight1.TargetRotation = 10;
            World.AddObject(antennaRight2);
            antennaRight2.SetSprite("Robot/RobotSpriteRAntennae2");
            antennaRight2.TargetRotation = 40;

            Friction = new Vector2(0.85f, 1);
            Gravity = gravity;

            startedSlowingDownJump = false;

            TimeSinceHWallCollision = 0;
            TimeSinceVWallCollision = 0;

            movementSpeedModifier = 1;
            jumpHeightModifier = 1;
            ShootingSpeedMod = 1;
        }