示例#1
0
        public BodyPotatoShiny() : base("bodyPotatoShiny.png")
        {
            SetHealthAndMaxHealth(18);
            NormalAnchorPoint = CCPoint.AnchorMiddle;
            // set your types
            Types = new Type[] { Type.BODY };

            // add mount points for two single wings (and a rivaling double wing mount)
            var wingMount1      = new PartMount(this, new CCPoint((ContentSize.Width * 0.75f), (ContentSize.Height / 2) + 5), Type.SINGLE_WING);
            var wingMount2      = new PartMount(this, new CCPoint((ContentSize.Width * 0.75f), (ContentSize.Height / 2) - 5), Type.SINGLE_WING);
            var doubleWingMount = new PartMount(this, new CCPoint((ContentSize.Width * 0.65f), ContentSize.Height / 2), Type.WINGS);

            doubleWingMount.Dz = 2;
            doubleWingMount.PossiblyBlockingPartMounts.Add(wingMount1);
            doubleWingMount.PossiblyBlockingPartMounts.Add(wingMount2);
            wingMount1.PossiblyBlockingPartMounts.Add(doubleWingMount);
            wingMount2.PossiblyBlockingPartMounts.Add(doubleWingMount);
            // add mount points for two rudders
            var rudderMount1 = new PartMount(this, new CCPoint(2f, (ContentSize.Height / 2) + 1), Type.RUDDER);
            var rudderMount2 = new PartMount(this, new CCPoint(2f, (ContentSize.Height / 2) - 1), Type.RUDDER);
            // add a mount for a rotor or weapon
            var rotorMount = new PartMount(this, new CCPoint(ContentSize.Width - 3, ContentSize.Height / 2), Type.ROTOR, Type.GUN);

            rotorMount.MaxTurningAngle = 40f;

            PartMounts = new PartMount[] { wingMount1, wingMount2, doubleWingMount, rudderMount1, rudderMount2, rotorMount };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(35);
        }
示例#2
0
        public BodyJet() : base("bodyJet.png")
        {
            SetHealthAndMaxHealth(40);
            NormalAnchorPoint = CCPoint.AnchorMiddle;
            // set your types
            Types = new Type[] { Type.BODY };

            // add mount points for two single wings
            var wingMount1 = new PartMount(this, new CCPoint(ContentSize.Width * 0.4f, (ContentSize.Height / 2) + 5), Type.SINGLE_WING);
            var wingMount2 = new PartMount(this, new CCPoint(ContentSize.Width * 0.4f, (ContentSize.Height / 2) - 5), Type.SINGLE_WING);
            // add mount points for two rudders
            var rudderMount1 = new PartMount(this, new CCPoint(6f, (ContentSize.Height / 2) + 2), Type.RUDDER);
            var rudderMount2 = new PartMount(this, new CCPoint(6f, (ContentSize.Height / 2) - 2), Type.RUDDER);

            PartMounts = new PartMount[] { wingMount1, wingMount2, rudderMount1, rudderMount2 };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(80);

            // add a special maneuver ability! (jet propulsion :) )
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 2.75f, (float)Math.Pow(10, 5) * 35.0f);
            ManeuverAbility.CloudTailNode.ReferenceSize *= 2f;
        }
示例#3
0
        public BodyBigBomberShiny() : base("bodyBigBomberShiny.png")
        {
            SetHealthAndMaxHealth(80);
            NormalAnchorPoint = CCPoint.AnchorMiddle;
            // set your types
            Types = new Type[] { Type.BODY };

            // NEW: add mount points for two single wings
            var wingMount1 = new PartMount(this, new CCPoint((ContentSize.Width * 0.62f), (ContentSize.Height / 2) + 4), Type.SINGLE_WING);
            var wingMount2 = new PartMount(this, new CCPoint((ContentSize.Width * 0.62f), (ContentSize.Height / 2) - 4), Type.SINGLE_WING);
            // add mount points for two rudders
            var rudderMount1 = new PartMount(this, new CCPoint(11f, (ContentSize.Height / 2) + 2), Type.RUDDER);
            var rudderMount2 = new PartMount(this, new CCPoint(11f, (ContentSize.Height / 2) - 2), Type.RUDDER);
            // add a mount for a weapon
            var gunMount = new PartMount(this, new CCPoint(31, ContentSize.Height / 2), Type.GUN);

            gunMount.MaxTurningAngle = 180f;

            PartMounts = new PartMount[] { wingMount1, wingMount2, rudderMount1, rudderMount2, gunMount };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(160);
        }
示例#4
0
        public BodyBalloonShiny() : base("bodyBalloonShiny.png")
        {
            SetHealthAndMaxHealth(40);
            NormalAnchorPoint = CCPoint.AnchorMiddle;
            // set your types
            Types = new Type[] { Type.BODY };

            // add a central mount point for a weapon
            var weaponMount = new PartMount(this, (CCPoint)ContentSize / 2, Type.GUN);

            weaponMount.MaxTurningAngle = 115f;
            weaponMount.Dz = -1;

            // add mount points for two rotors
            var rotorMount1 = new PartMount(this, new CCPoint(ContentSize.Width / 2, 4), Type.ROTOR);
            var rotorMount2 = new PartMount(this, new CCPoint(ContentSize.Width / 2, ContentSize.Height - 4), Type.ROTOR);

            rotorMount1.Dz = 1;
            rotorMount2.Dz = 1;

            PartMounts = new PartMount[] { weaponMount, rotorMount1, rotorMount2 };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(400);
        }
        public BodyFighterShiny() : base("bodyFighterShiny.png")
        {
            SetHealthAndMaxHealth(30);
            NormalAnchorPoint = CCPoint.AnchorMiddle;
            // set your types
            Types = new Type[] { Type.BODY };

            // add mount points for two single wings
            var wingMount1      = new PartMount(this, new CCPoint(ContentSize.Width * 0.65f, (ContentSize.Height / 2) + 3), Type.SINGLE_WING);
            var wingMount2      = new PartMount(this, new CCPoint(ContentSize.Width * 0.65f, (ContentSize.Height / 2) - 3), Type.SINGLE_WING);
            var doubleWingMount = new PartMount(this, new CCPoint((ContentSize.Width * 0.65f), ContentSize.Height / 2), Type.WINGS);

            doubleWingMount.PossiblyBlockingPartMounts.Add(wingMount1);
            doubleWingMount.PossiblyBlockingPartMounts.Add(wingMount2);
            wingMount1.PossiblyBlockingPartMounts.Add(doubleWingMount);
            wingMount2.PossiblyBlockingPartMounts.Add(doubleWingMount);
            // add mount points for two rudders
            var rudderMount1 = new PartMount(this, new CCPoint(4.5f, (ContentSize.Height / 2) + 1), Type.RUDDER);
            var rudderMount2 = new PartMount(this, new CCPoint(4.5f, (ContentSize.Height / 2) - 1), Type.RUDDER);
            // add a mount for a rotor
            var rotorMount = new PartMount(this, new CCPoint(ContentSize.Width - 1, ContentSize.Height / 2), Type.ROTOR);

            PartMounts = new PartMount[] { wingMount1, wingMount2, doubleWingMount, rudderMount1, rudderMount2, rotorMount };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(55);
        }
示例#6
0
        public TestWings() : base("testWings.png")
        {
            // set your types
            Types             = new Type[] { Type.WINGS };
            NormalAnchorPoint = CCPoint.AnchorMiddle;

            // add a mount point for two engines at the center of each wing
            var engineMount1 = new PartMount(this, new CCPoint(ContentSize.Width / 2, (ContentSize.Height / 2) + (ContentSize.Height / 4)), Type.ENGINE);
            var engineMount2 = new PartMount(this, new CCPoint(ContentSize.Width / 2, (ContentSize.Height / 2) - (ContentSize.Height / 4)), Type.ENGINE);
            // add mount points for two guns a bit further out
            var gunMount1 = new PartMount(this, new CCPoint(ContentSize.Width / 2, (ContentSize.Height - (ContentSize.Height / 6))), Type.GUN);
            var gunMount2 = new PartMount(this, new CCPoint(ContentSize.Width / 2, ContentSize.Height / 6), Type.GUN);

            gunMount1.NullRotation = -20f;
            gunMount1.Dz           = 1;
            gunMount2.NullRotation = 20f;
            gunMount2.Dz           = 1;
            PartMounts             = new PartMount[] { engineMount1, engineMount2, gunMount1, gunMount2 };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = new MassPoint[] { new MassPoint((ContentSize.Width / 2) - 1, ContentSize.Height, 30), new MassPoint((ContentSize.Width / 2), (ContentSize.Height / 2) + (ContentSize.Height / 6), 50), new MassPoint((ContentSize.Width / 2), (ContentSize.Height / 2) - (ContentSize.Height / 6), 50), new MassPoint((ContentSize.Width / 2) - 1, 0, 30) };
        }
示例#7
0
        public TestBodyShiny() : base("bodyTestShiny.png")
        {
            SetHealthAndMaxHealth(18);
            NormalAnchorPoint = CCPoint.AnchorMiddle;
            //Position = new CCPoint((ContentSize.Width / 2), (ContentSize.Height / 2));
            // set your types
            Types = new Type[] { Type.BODY };

            // NEW: add mount points for two single wings
            var wingMount1      = new PartMount(this, new CCPoint((ContentSize.Width / 2) + 3f, (ContentSize.Height / 2) + 4), Type.SINGLE_WING);
            var wingMount2      = new PartMount(this, new CCPoint((ContentSize.Width / 2) + 3f, (ContentSize.Height / 2) - 4), Type.SINGLE_WING);
            var doubleWingMount = new PartMount(this, new CCPoint((ContentSize.Width / 2) + 3.5f, (ContentSize.Height / 2)), Type.WINGS);

            doubleWingMount.PossiblyBlockingPartMounts.Add(wingMount1);
            doubleWingMount.PossiblyBlockingPartMounts.Add(wingMount2);
            wingMount1.PossiblyBlockingPartMounts.Add(doubleWingMount);
            wingMount2.PossiblyBlockingPartMounts.Add(doubleWingMount);
            // add mount points for two rudders
            var rudderMount1 = new PartMount(this, new CCPoint(5, (ContentSize.Height / 2) + 1), Type.RUDDER);
            var rudderMount2 = new PartMount(this, new CCPoint(5, (ContentSize.Height / 2) - 1), Type.RUDDER);
            // add a mount for a rotor
            var rotorMount = new PartMount(this, new CCPoint(ContentSize.Width - 5, ContentSize.Height / 2), Type.ROTOR);

            PartMounts = new PartMount[] { wingMount1, wingMount2, doubleWingMount, rudderMount1, rudderMount2, rotorMount };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(55);
            //new MassPoint[] { new MassPoint(ContentSize.Width / 5, ContentSize.Height / 2, 100), new MassPoint(ContentSize.Width - (ContentSize.Width / 5), ContentSize.Height / 2, 90) };
        }
示例#8
0
        public WingBatShiny() : base("wingBatShiny.png")
        {
            SetHealthAndMaxHealth(18);
            // set your types
            Types             = new Type[] { Type.SINGLE_WING };
            NormalAnchorPoint = CCPoint.AnchorMiddleBottom;

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(6f);
        }
示例#9
0
        public TestEngine() : base("testEngine.png")
        {
            // set your types
            Types             = new Type[] { Type.ENGINE };
            NormalAnchorPoint = CCPoint.AnchorMiddle;

            // specify the mass points
            MassPoints = new MassPoint[] { new MassPoint(ContentSize.Width / 2, ContentSize.Height / 2, 30) };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the engine maneuver abilities
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 0.25f, (float)Math.Pow(10, 5) * 3.0f);//, (float)Math.Pow(10, 5)*0.1f, (float)Math.Pow(10, 5));
        }
示例#10
0
        public WeaponScrap() : base("weaponScrap.png")
        {
            SetHealthAndMaxHealth(4);
            // set your types
            Types             = new Type[] { Type.GUN };
            NormalAnchorPoint = new CCPoint(1.5f / ContentSize.Width, 0.5f);

            // specify the mass points
            MassPoints = new MassPoint[] { new MassPoint(ContentSize.Width / 2, ContentSize.Height / 2, 12) };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the gun a WeaponAbility
            WeaponAbility = WeaponAbility.CreateScrapWeapon(this);
        }
示例#11
0
        public TestRotorShiny() : base("rotorTestShiny.png")
        {
            SetHealthAndMaxHealth(11);
            // set your types
            Types             = new Type[] { Type.ROTOR };
            NormalAnchorPoint = new CCPoint(3 / ContentSize.Width, 0.5f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(11f);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the rotor ManeuverAbility
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 7.25f, (float)Math.Pow(10, 5) * 17.0f);
        }
示例#12
0
        public WingAngel() : base("wingAngel.png")
        {
            SetHealthAndMaxHealth(10);
            // set your types
            Types             = new Type[] { Type.SINGLE_WING };
            NormalAnchorPoint = new CCPoint(0.5f, 1 / ContentSize.Height);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(20f);

            // give it a maneuver ability
            ManeuverAbility = new ManeuverAbility(0, 0, 0, (float)Math.Pow(10, 5) * 3.75f);
        }
示例#13
0
        public TestWeaponShiny() : base("weaponTestShiny.png") // for now, as there is no gun sprite yet
        {
            SetHealthAndMaxHealth(8);
            // set your types
            Types             = new Type[] { Type.GUN };
            NormalAnchorPoint = new CCPoint(1 / ContentSize.Width, 0.5f);

            // specify the mass points
            MassPoints = new MassPoint[] { new MassPoint(ContentSize.Width / 2, ContentSize.Height / 2, 30) };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the gun a WeaponAbility
            WeaponAbility = WeaponAbility.CreateTestWeaponShiny(this);
        }
示例#14
0
        public RudderBigBomberShiny() : base("rudderBigBomberShiny.png")
        {
            SetHealthAndMaxHealth(30);
            // set your types
            Types             = new Type[] { Type.RUDDER };
            NormalAnchorPoint = new CCPoint(0.5f, 0f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(35f);

            // specify the collision type
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the rudder ManeuverAbility
            ManeuverAbility = new ManeuverAbility(0, 0, (float)Math.Pow(10, 5) * 5f, (float)Math.Pow(10, 5) * 10f);
        }
示例#15
0
        public RudderJet() : base("rudderJet.png")
        {
            SetHealthAndMaxHealth(20);
            // set your types
            Types             = new Type[] { Type.RUDDER };
            NormalAnchorPoint = new CCPoint(5f / ContentSize.Width, 0f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(8f);

            // specify the collision type
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the rudder ManeuverAbility
            ManeuverAbility = new ManeuverAbility(0, 0, (float)Math.Pow(10, 5) * 2.5f, (float)Math.Pow(10, 5) * 10f);
        }
        public WeaponBigBomberShiny() : base("weaponBigBomberShiny.png")
        {
            SetHealthAndMaxHealth(26);
            // set your types
            Types             = new Type[] { Type.GUN };
            NormalAnchorPoint = new CCPoint(1.5f / ContentSize.Width, 0.5f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(35f);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the gun a WeaponAbility
            WeaponAbility = WeaponAbility.CreateBigBomberWeaponShiny(this);
        }
        public WeaponFighterShiny() : base("weaponFighterShiny.png")
        {
            SetHealthAndMaxHealth(8);
            // set your types
            Types             = new Type[] { Type.GUN };
            NormalAnchorPoint = CCPoint.AnchorMiddle;

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(12f);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the gun a WeaponAbility
            WeaponAbility = WeaponAbility.CreateFighterWeaponShiny(this);
        }
示例#18
0
        public TestRudder() : base("testRudder.png")
        {
            SetHealthAndMaxHealth(4);
            // set your types
            Types             = new Type[] { Type.RUDDER };
            NormalAnchorPoint = new CCPoint(0.5f, 0f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(5f);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the rotor ManeuverAbility
            ManeuverAbility = new ManeuverAbility(0, 0, (float)Math.Pow(10, 5) * 1f, (float)Math.Pow(10, 5) * 3.0f);
        }
示例#19
0
        public DoubleWingScrap() : base("doubleWingScrap.png")
        {
            SetHealthAndMaxHealth(22);
            // set your types
            Types             = new Type[] { Type.WINGS };
            NormalAnchorPoint = CCPoint.AnchorMiddle;

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the wings a special ManeuverAbility (allowing to glide forward even after the rotor has been hit)
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 4.25f, (float)Math.Pow(10, 5) * 4.3f);
            ManeuverAbility.CloudTailNode = null;

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(60);
        }
示例#20
0
        public WingPotato() : base("wingPotato.png")
        {
            SetHealthAndMaxHealth(3);
            // set your types
            Types             = new Type[] { Type.SINGLE_WING };
            NormalAnchorPoint = new CCPoint(0.6f, 2 / ContentSize.Height);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(12f);

            // give it a maneuver ability!
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 1.25f, (float)Math.Pow(10, 5) * 2.0f, (float)Math.Pow(10, 5) * 0.45f, (float)Math.Pow(10, 5) * 0.75f);
            ManeuverAbility.CloudTailNode = null;
        }
        public RotorPotato() : base("rotorPotato.png")
        {
            SetHealthAndMaxHealth(5);
            // set your types
            Types             = new Type[] { Type.ROTOR };
            NormalAnchorPoint = new CCPoint(3 / ContentSize.Width, 0.5f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(8f);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the rotor ManeuverAbility
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 0.75f, (float)Math.Pow(10, 5) * 2.0f);
            ManeuverAbility.CloudTailNode.CloudDelay    = 0.5f;
            ManeuverAbility.CloudTailNode.CloudLifeTime = 1.5f;
        }
        public RotorBalloonShiny() : base("rotorBalloonShiny.png")
        {
            SetHealthAndMaxHealth(10);
            // set your types
            Types             = new Type[] { Type.ROTOR };
            NormalAnchorPoint = new CCPoint(0.35f, 0.5f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(12f);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the rotor ManeuverAbility
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 0.5f, (float)Math.Pow(10, 5) * 4.0f);
            ManeuverAbility.CloudTailNode.CloudDelay    = 0.35f;
            ManeuverAbility.CloudTailNode.CloudLifeTime = 1.0f;
        }
示例#23
0
        public RotorBatShiny() : base("rotorBatShiny.png")
        {
            SetHealthAndMaxHealth(8);
            // set your types
            Types             = new Type[] { Type.ROTOR };
            NormalAnchorPoint = new CCPoint(1 / ContentSize.Width, 0.5f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(4f);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the rotor ManeuverAbility
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 0.35f, (float)Math.Pow(10, 5) * 3.5f);
            ManeuverAbility.CloudTailNode.CloudDelay    = 0.2f;
            ManeuverAbility.CloudTailNode.CloudLifeTime = 1.25f;
            ManeuverAbility.CloudTailNode.CloudColor    = new CCColor4B(1f, 0.8f, 1f, 1f);
        }
        public WingFighterShiny() : base("wingFighterShiny.png")
        {
            SetHealthAndMaxHealth(25);
            // set your types
            Types             = new Type[] { Type.SINGLE_WING };
            NormalAnchorPoint = new CCPoint(0.5f, 1 / ContentSize.Height);

            // add a mount point for a gun
            var gunMount = new PartMount(this, new CCPoint(ContentSize.Width / 2, ContentSize.Height / 2), Type.GUN);

            gunMount.Dz = -1;
            PartMounts  = new PartMount[] { gunMount };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(18f);
        }
        public WingBigBomber() : base("wingBigBomber.png")
        {
            SetHealthAndMaxHealth(40);
            // set your types
            Types             = new Type[] { Type.SINGLE_WING };
            NormalAnchorPoint = new CCPoint(0.5f, 0);

            // add mount points for 2 rotors
            var rotorMount1 = new PartMount(this, new CCPoint(ContentSize.Width - 3f, 8.5f), Type.ROTOR);
            var rotorMount2 = new PartMount(this, new CCPoint(ContentSize.Width - 3f, 21.5f), Type.ROTOR);

            PartMounts = new PartMount[] { rotorMount1, rotorMount2 };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(120f);
        }
示例#26
0
        public RotorBigBomberShiny() : base("rotorBigBomberShiny.png")
        {
            SetHealthAndMaxHealth(11);
            // set your types
            Types             = new Type[] { Type.ROTOR };
            NormalAnchorPoint = new CCPoint(3 / ContentSize.Width, 0.5f);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(11f);

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // give the rotor ManeuverAbility
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 3.0f, (float)Math.Pow(10, 5) * 11.0f);
            ManeuverAbility.CloudTailNode.CloudDelay    *= 2;
            ManeuverAbility.CloudTailNode.CloudLifeTime /= 2;
            ManeuverAbility.CloudTailNode.ReferenceSize  = 24f;
        }
        public TestDoubleWingShiny() : base("doubleWingsTestShiny.png")
        {
            SetHealthAndMaxHealth(17);
            // set your types
            Types             = new Type[] { Type.WINGS };
            NormalAnchorPoint = CCPoint.AnchorMiddle;

            // add mounts points for guns
            var gunMount1 = new PartMount(this, new CCPoint(ContentSize.Width / 2, (ContentSize.Height - (ContentSize.Height / 4))), Type.GUN);
            var gunMount2 = new PartMount(this, new CCPoint(ContentSize.Width / 2, (ContentSize.Height / 4)), Type.GUN);

            gunMount1.Dz = -1;
            gunMount2.Dz = -1;
            PartMounts   = new PartMount[] { gunMount1, gunMount2 };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(28);
        }
示例#28
0
        public TestWing() : base("testWing.png")
        {
            // set your types
            Types             = new Type[] { Type.SINGLE_WING };
            NormalAnchorPoint = CCPoint.AnchorMiddleBottom;

            // add a mount point for two engines at the center of the wing
            var engineMount = new PartMount(this, new CCPoint(ContentSize.Width / 2, (ContentSize.Height / 2)), Type.ENGINE);
            // add a mount points for a gun a bit further out
            var gunMount = new PartMount(this, new CCPoint(ContentSize.Width / 2, (ContentSize.Height - (ContentSize.Height / 4))), Type.GUN);

            gunMount.NullRotation = -20f;
            gunMount.Dz           = 1;
            PartMounts            = new PartMount[] { engineMount, gunMount };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = new MassPoint[] { new MassPoint((ContentSize.Width / 2) - 1, ContentSize.Height, 30), new MassPoint((ContentSize.Width / 2), (ContentSize.Height / 2) + (ContentSize.Height / 6), 50), new MassPoint((ContentSize.Width / 2), (ContentSize.Height / 2) - (ContentSize.Height / 6), 50), new MassPoint((ContentSize.Width / 2) - 1, 0, 30) };
        }
示例#29
0
        public BodyScrap() : base("bodyScrap.png")
        {
            SetHealthAndMaxHealth(14);
            NormalAnchorPoint = CCPoint.AnchorMiddle;
            //Position = new CCPoint((ContentSize.Width / 2), (ContentSize.Height / 2));
            // set your types
            Types = new Type[] { Type.BODY };

            // OLD: add a mount point for wings at your center
            // NEW: add mount points for two single wings
            var wingMount1      = new PartMount(this, new CCPoint((ContentSize.Width / 2) + 4.5f, (ContentSize.Height / 2) + 4), Type.SINGLE_WING);
            var wingMount2      = new PartMount(this, new CCPoint((ContentSize.Width / 2) + 4.5f, (ContentSize.Height / 2) - 4), Type.SINGLE_WING);
            var doubleWingMount = new PartMount(this, new CCPoint((ContentSize.Width / 2) + 5f, (ContentSize.Height / 2)), Type.WINGS);

            doubleWingMount.Dz = 2;
            doubleWingMount.PossiblyBlockingPartMounts.Add(wingMount1);
            doubleWingMount.PossiblyBlockingPartMounts.Add(wingMount2);
            wingMount1.PossiblyBlockingPartMounts.Add(doubleWingMount);
            wingMount2.PossiblyBlockingPartMounts.Add(doubleWingMount);
            // add mount points for two rudders
            var rudderMount1 = new PartMount(this, new CCPoint(5, (ContentSize.Height / 2) + 1), Type.RUDDER);
            var rudderMount2 = new PartMount(this, new CCPoint(5, (ContentSize.Height / 2) - 1), Type.RUDDER);
            // add a mount for a rotor
            var rotorMount = new PartMount(this, new CCPoint(ContentSize.Width - 4, ContentSize.Height / 2), Type.ROTOR);
            // add a mount for a weapon aiming backwards
            var weaponMount = new PartMount(this, new CCPoint(15f, ContentSize.Height / 2), Type.GUN);

            weaponMount.NullRotation    = 180f;
            weaponMount.MaxTurningAngle = 75f;

            PartMounts = new PartMount[] { wingMount1, wingMount2, doubleWingMount, rudderMount1, rudderMount2, rotorMount, weaponMount };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(60);
            //new MassPoint[] { new MassPoint(ContentSize.Width / 5, ContentSize.Height / 2, 100), new MassPoint(ContentSize.Width - (ContentSize.Width / 5), ContentSize.Height / 2, 90) };
        }
示例#30
0
        public WingPotatoShiny() : base("wingPotatoShiny.png")
        {
            SetHealthAndMaxHealth(3);
            // set your types
            Types             = new Type[] { Type.SINGLE_WING };
            NormalAnchorPoint = new CCPoint(0.6f, 2 / ContentSize.Height);

            // SHINY: add a mount point for a weapons
            var weaponMount = new PartMount(this, new CCPoint(ContentSize.Width - 6, ContentSize.Height - 7), Type.GUN);

            weaponMount.MaxTurningAngle = 90f;

            PartMounts = new PartMount[] { weaponMount };

            // specify the collision polygon
            CollisionType = Collisions.CreateDiamondCollisionPolygon(this);

            // specify the mass points
            MassPoints = CreateDiamondMassPoints(15f);

            // give it a maneuver ability!
            ManeuverAbility = new ManeuverAbility((float)Math.Pow(10, 5) * 0.95f, (float)Math.Pow(10, 5) * 3.0f, (float)Math.Pow(10, 5) * 0.45f, (float)Math.Pow(10, 5) * 0.75f);
            ManeuverAbility.CloudTailNode = null;
        }