static void Initialize() { initialized = true; DefaultCost = new Costs(new ShipStateChange(0, 0, 0, 0), new ShipStateChange(0, 0, 0, 0), null); DefaultDelay = new Bounded <float>(TimeWarp.RateToTime(0)); DefaultDamageDelay = new Bounded <float>(.08f); DefaultTargetingTypes = TargetingInfo.None; DefaultInitialRadius = ShofixtiScout.DefaultShape.BoundingRadius; DefaultExpansionRate = ShofixtiScout.DefaultShape.BoundingRadius + TimeWarp.ScaleRange(13); DefaultMass = 2; DefaultLeverPulls = 3; DefaultLifeTime = new LifeSpan(1); DefaultEffectCollection.Effects.Add(new ShipStateEffect(TargetingInfo.All, EffectTypes.None, new EffectSounds(), new ShipStateChange(-2, 0, 0, 0))); DefaultEffectCollection.AttachmentFlags |= EffectAttachmentFlags.ClonedAttachment; DefaultActionSounds = new ActionSounds(); }
public void BindWorld(Vector2D position) { Bounded <float> arenaXSize = new Bounded <float>(ArenaXSize.Lower + position.X, 0, ArenaXSize.Upper + position.X, true); Bounded <float> arenaYSize = new Bounded <float>(ArenaYSize.Lower + position.Y, 0, ArenaYSize.Upper + position.Y, true); foreach (ICollidableBody collidable in world.Collidables) { Vector2D pos = collidable.Current.Position.Linear; pos.X = arenaXSize.Binder.Bind(pos.X); pos.Y = arenaYSize.Binder.Bind(pos.Y); if (collidable.Current.Position.Linear != pos) { collidable.Current.Position.Linear = pos; collidable.CalcBoundingBox2D(); collidable.SaveGood(); } } }
static void Initialize() { initialized = true; //DefaultTargetingTypes = TargetingInfo.Enemy; DefaultTargetingTypes = new TargetingInfo(TargetingTypes.Other); DefaultCost = new Costs(new ShipStateChange(0, 2, 0, 0), null, null); DefaultDelay = new Bounded <float>(TimeWarp.RateToTime(0)); DefaultEffectCollection.Effects.Add( new ShipStateEffect( DefaultTargetingTypes, EffectTypes.None, new EffectSounds(), new ShipStateChange(-.25f, 0, 0, 0))); DefaultLifeTime = new LifeSpan(TimeWarp.RateToTime(0)); DefaultActionSounds = new ActionSounds("Laser2", null, null); DefaultEffectCollection.AttachmentFlags |= EffectAttachmentFlags.ClonedAttachment; }
static void Initialize() { initialized = true; DefaultTargetingTypes = TargetingInfo.None; DefaultCost = new Costs(new ShipStateChange(0, 0, 0, 0), null, null); DefaultRange = TimeWarp.ScaleRange(8); DefaultDelay = new Bounded <float>(TimeWarp.RateToTime(0)); DefaultEffectCollection.Effects.Add( new ShipStateEffect( DefaultTargetingTypes, EffectTypes.None, new EffectSounds(), new ShipStateChange(-1f / (float)DefaultWeaponCount, 0, 0, 0))); DefaultLifeTime = new LifeSpan(TimeWarp.RateToTime(0)); DefaultActionSounds = new ActionSounds("EnergyField1", null, null); InitWeaponSettings(); DefaultEffectCollection.AttachmentFlags |= EffectAttachmentFlags.ClonedAttachment; }
static void Initialize() { initialized = true; InitShape(); DefaultTargetingTypes = TargetingInfo.None; DefaultMovementInfo = new ShipMovementInfo( new Bounded <float>(0), new Bounded <float>(0), new Bounded <float>(0), new Bounded <float>(TimeWarp.ScaleVelocity(120))); DefaultDelay = new Bounded <float>(TimeWarp.RateToTime(0)); DefaultLifeTime = new LifeSpan(TimeWarp.RangeToTime(11, 120)); DefaultState = new ShipState(new Bounded <float>(1), new Bounded <float>(0), new Bounded <float>(0), new Bounded <float>(0)); DefaultCost = new Costs(new ShipStateChange(0, 1, 0, 0), null, null); DefaultEffectCollection.Effects.Add(new ShipStateEffect(TargetingInfo.All, EffectTypes.None, new EffectSounds(), new ShipStateChange(-1, 0, 0, 0))); DefaultActionSounds = new ActionSounds("Gun3", null, null); }
static void Initialize() { initialized = true; DefaultMass = .5f; DefaultInitialRadius = 20; DefaultExpansionRate = 7; DefaultMovementInfo = new ShipMovementInfo( new Bounded <float>(TimeWarp.AngularAcceleration), new Bounded <float>(TimeWarp.ScaleTurning(1)), new Bounded <float>(1000), new Bounded <float>(TimeWarp.ScaleVelocity(35))); DefaultDelay = new Bounded <float>(TimeWarp.RateToTime(5)); DefaultLifeTime = new LifeSpan(TimeWarp.RangeToTime(60, 35)); DefaultState = new ShipState(new Bounded <float>(4), new Bounded <float>(0), new Bounded <float>(0), new Bounded <float>(0)); DefaultCost = new Costs(new ShipStateChange(0, 20, 0, 0), null, null); DefaultEffectCollection.Effects.Add(new DiminishingShipStateEffect(TargetingInfo.All, EffectTypes.None, new EffectSounds(), new ShipStateChange(-10, 0, 0, 0))); DefaultTargetingTypes = new TargetingInfo(TargetingTypes.None, TargetingTypes.Enemy | TargetingTypes.Ship, TargetingTypes.None); DefaultActionSounds = new ActionSounds("DeepEcho", null, null); }
static void Initialize() { initialized = true; InitShape(); DefaultMovementInfo = new ShipMovementInfo( new Bounded <float>(TimeWarp.AngularAcceleration), new Bounded <float>(TimeWarp.ScaleTurning(4)), new Bounded <float>(TimeWarp.ScaleAcceleration(6, 3)), new Bounded <float>(TimeWarp.ScaleVelocity(18))); DefaultState = new ShipState(new Bounded <float>(10), new Bounded <float>(30), new Bounded <float>(0), new Bounded <float>(0));//TimeWarp.RechargeRateToPerSeconds(150, 30))); DefaultRechargeDelay = new Bounded <float>(TimeWarp.RateToTime(150)); DefaultActions.Add(UmgahDronePrimary.Create()); DefaultActions.Add(UmgahDroneSecondary.Create()); DefaultControlableSounds = new ControlableSounds(null, "ShipDies"); DefaultShipSounds = new ShipSounds("UmgahDroneDitty"); }
static void Initialize() { initialized = true; InitShape(); DefaultMovementInfo = new ShipMovementInfo( new Bounded <float>(TimeWarp.AngularAcceleration), new Bounded <float>(TimeWarp.ScaleTurning(0)), new Bounded <float>(100000), new Bounded <float>(TimeWarp.ScaleVelocity(25))); DefaultState = new ShipState(new Bounded <float>(2), new Bounded <float>(0), new Bounded <float>(0), new Bounded <float>(0)); DefaultCost = new Costs(new ShipStateChange(0, 3, 0, 0), null, null); DefaultDelay = new Bounded <float>(TimeWarp.RateToTime(0)); DefaultLifeTime = new LifeSpan(TimeWarp.RangeToTime(50, 25)); DefaultEffectsWho = new TargetingInfo(TargetingTypes.Enemy | TargetingTypes.Debris, TargetingTypes.None, TargetingTypes.None); DefaultEffectCollection.Effects.Add(new ShipStateEffect(DefaultEffectsWho, EffectTypes.None, new EffectSounds(), new ShipStateChange(-2, 0, 0, 0))); DefaultTargetingTypes = new TargetingInfo(TargetingTypes.None, TargetingTypes.Enemy | TargetingTypes.Ship, TargetingTypes.None); DefaultActionSounds = new ActionSounds("BubblePop", null, null); }
static void Initialize() { initialized = true; DefaultTargetingTypes = new TargetingInfo(TargetingTypes.None, TargetingTypes.Enemy | TargetingTypes.Ship, TargetingTypes.None); DefaultEffectsWho = new TargetingInfo(TargetingTypes.Enemy | TargetingTypes.Debris); InitShape(); DefaultMovementInfo = new ShipMovementInfo( new Bounded <float>(0), new Bounded <float>(0), new Bounded <float>(TimeWarp.ScaleAcceleration(4, 0)), new Bounded <float>(TimeWarp.ScaleVelocity(64))); DefaultDelay = new Bounded <float>(TimeWarp.RateToTime(6)); DefaultLifeTime = new LifeSpan(20); DefaultState = new ShipState(new Bounded <float>(6), new Bounded <float>(0), new Bounded <float>(0), new Bounded <float>(0)); DefaultCost = new Costs(new ShipStateChange(0, 6, 0, 0), new ShipStateChange(), new ShipStateChange()); DefaultEffectCollection.Effects.Add(new ShipStateEffect(DefaultEffectsWho, EffectTypes.None, new EffectSounds(), new ShipStateChange(-4, 0, 0, 0))); DefaultActionSounds = new ActionSounds("MechanicalGun", null, null); }
public GunAction( Bounded <float> delay, TargetingInfo targetableTypes, Costs costs, bool needsTarget, ActionSounds actionSounds, float velocityAngle, float offsetAngle, ISolidWeapon weapon, float randomVelocityAngle, float randomOffsetAngle, float randomDistance) : this( delay, targetableTypes, costs, needsTarget, actionSounds, new float[] { velocityAngle }, new float[] { offsetAngle }, new ISolidWeapon[] { weapon }, new float[] { randomVelocityAngle }, new float[] { randomOffsetAngle }, new float[] { randomDistance }) { }
public GunAction( Bounded <float> delay, TargetingInfo targetableTypes, Costs costs, bool needsTarget, ActionSounds actionSounds, float[] velocityAngles, float[] offsetAngles, ISolidWeapon[] weapons, float[] randomVelocityAngles, float[] randomOffsetAngles, float[] randomDistances) : base(delay, targetableTypes, costs, needsTarget, actionSounds) { this.velocityAngles = velocityAngles; this.randomVelocityAngles = randomVelocityAngles; this.offsetAngles = offsetAngles; this.randomOffsetAngles = randomOffsetAngles; this.randomDistances = randomDistances; this.weapons = weapons; this.aIInfo = new MultiGunActionAIInfo(costs.ActivationCost); this.currentWeapons = new ISolidWeapon[weapons.Length]; }
static void Initialize() { initialized = true; //what it can target. DefaultTargetingTypes = TargetingInfo.Self; //what it can effect. DefaultEffectsWho = DefaultTargetingTypes; //the cost. DefaultCost = new Costs(new ShipStateChange(0, 3, 0, 0), null, null); // teh delay before it can be activated again. DefaultDelay = new Bounded <float>(TimeWarp.RateToTime(2)); //Adds a effect. DefaultEffectCollection.Effects.Add( new RandomTeleport( // its a random teleport! DefaultTargetingTypes, //what it can target. EffectTypes.None, //extra effect types. new EffectSounds(), // sounds played on applied. 3000)); // the maximum distance it can travel. //The sounds it plays! DefaultActionSounds = new ActionSounds("QuasiJump", null, null); }
public UmgahDrone(UmgahDrone copy) : base(copy) { this.rechargeDelay = new Bounded <float> (copy.rechargeDelay); }
public BordingPartyEffect(TargetingInfo effectsWho, EffectTypes harmfulEffectTypes, EffectSounds effectSounds, LifeSpan lifeTime, Bounded <float> damageDelay, float damageAmount) : base(effectsWho, harmfulEffectTypes | EffectTypes.Health, effectSounds, lifeTime) { this.damageDelay = damageDelay; this.damageAmount = damageAmount; }
public void Test01() { var b1 = Bounded.make <int>(); claim.satisfies(b1, b => b.minval == Int32.MinValue && b.maxval == Int32.MaxValue); }
protected BordingPartyEffect(BordingPartyEffect copy) : base(copy) { this.damageDelay = new Bounded <float>(copy.damageDelay); this.damageAmount = copy.damageAmount; }
public MultipleHitWeaponsLogic(MultipleHitWeaponsLogic copy) : base(copy) { this.damageDelay = new Bounded <float>(copy.damageDelay); this.didCollision = false; }