// Constructors. public UnitCore( BodyModule body = null, DurabilityModule durability = null, IConditionModule condition = null, AbilityCollectionModule abilityCollection = null, IntelligenceModule intelligence = null) { // Modules. this.body = body?.Clone() ?? new BodyModule(); this.body.Connect(Presentation); this.durability = durability?.Clone() ?? new DurabilityModule(); this.durability.Connect(Presentation); this.condition = condition?.Clone() ?? this.durability.CreateUsualCondition(); this.condition.Connect(Presentation); this.abilityCollection = abilityCollection?.Clone() ?? new AbilityCollectionModule(); this.abilityCollection.Connect(Presentation); this.intelligence = intelligence?.Clone() ?? new IntelligenceModule(); this.intelligence.Connect(Presentation); }
// Constructor. public ConditionChangingAction(IConditionModule condition, bool forceChange) { this.condition = condition; this.forceChange = forceChange; }