protected override bool OnTargetAquired(GameResult gameResult, float dt, IControlable newTarget) { TargetedRayWeapon newWeapon = (TargetedRayWeapon)weapon.Clone(); newWeapon.OnCreation(gameResult, source, this); newWeapon.WeaponInfo.Target = newTarget; return(true); }
public RayPointDefence(Bounded <float> delay, TargetingInfo targetableTypes, Costs costs, ActionSounds actionSounds, float radius, int maxNumberofTargets, TargetedRayWeapon weapon) : base(delay, targetableTypes, costs, actionSounds, radius, maxNumberofTargets) { this.weapon = weapon; }
/// <summary> /// Creates the weapon the action fires. /// </summary> /// <returns>the weapon the action fires</returns> static TargetedRayWeapon CreateWeapon() { TargetedRayWeapon rv = new TargetedRayWeapon( (LifeSpan)DefaultLifeTime.Clone(), new WeaponsLogic(DefaultEffectsWho, new EffectCollection(DefaultEffectCollection)), DefaultImpulse, DefaultRadius); return(rv); }
protected RayPointDefence(RayPointDefence copy) : base(copy) { this.weapon = (TargetedRayWeapon)copy.weapon.Clone(); }