/// <summary> /// This constructor is only for serialisation. /// </summary> public ForwardShot() { _gunBarrels = ShipBarrelTypes.Middle | ShipBarrelTypes.Left | ShipBarrelTypes.Right | ShipBarrelTypes.Rear; _muzzleFireEngineNames = new[] { (CanonicalString)"dummypeng" }; _shotSpeed = 300f; _shotAngleVariation = 0.3f; _shotAngleEvenDistribution = false; _shotSpeedVariation = 20f; }
protected void ForEachShipBarrel(ShipBarrelTypes barrelTypes, ShipBarrelAction action) { if ((barrelTypes & ~(ShipBarrelTypes.Middle | ShipBarrelTypes.Left | ShipBarrelTypes.Right | ShipBarrelTypes.Rear)) != 0) throw new ApplicationException("Unknown ShipBarrelTypes " + barrelTypes); if ((barrelTypes & ShipBarrelTypes.Middle) != 0) action(GetBarrelBoneIndex(0), 0); if ((barrelTypes & ShipBarrelTypes.Left) != 0) action(GetBarrelBoneIndex(1), 0); if ((barrelTypes & ShipBarrelTypes.Right) != 0) action(GetBarrelBoneIndex(2), 0); if ((barrelTypes & ShipBarrelTypes.Rear) != 0) action(GetBarrelBoneIndex(3), MathHelper.Pi); }
/// <summary> /// Only for serialization. /// </summary> public PowerCone() { _gunBarrels = ShipBarrelTypes.Middle; }