public void OnCreation(IShip source, IWeaponsLogic weaponInfo) { this.weaponInfo = weaponInfo; foreach (IEffect effect in effects) { effect.OnCreation(weaponInfo); effectsWho = TargetingInfo.Merge(effectsWho, effect.EffectsWho); } foreach (IProlongedEffect prolongedEffect in prolongedEffects) { prolongedEffect.OnCreation(weaponInfo); effectsWho = TargetingInfo.Merge(effectsWho, prolongedEffect.EffectsWho); } }
public virtual void OnCreation(GameResult gameResult, IWeapon host, IShip source, IAction actionSource) { this.host = host; this.source = source; this.actionSource = actionSource; this.target = actionSource.Target; this.parentWeapon = null; if (source != null) { this.factionInfo = new FactionInfo(source.FactionInfo); } else { this.factionInfo = new FactionInfo(solidHost.FactionInfo); } this.effectCollection.OnCreation(source, this); this.effectsWho = TargetingInfo.Merge(effectsWho, effectCollection.EffectsWho); }