// Helper function public Module AddModuleFromData(Loading.ModuleData moduleData) { Modules.Module module = Loading.CardLoading.GetModuleFromData(moduleData); module.Setup(this, moduleData); this.AddModule(moduleData.Type, module); return(module); }
public void AddModule(Loading.ModuleData data) { if (mModules == null) { mModules = new List <ModuleData>(); } mModules.Add(data); }
protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD) { this.Parent = (Unit)Parent; bool.TryParse(MD.Data[0], out mCanBypass.ShortOnShort); bool.TryParse(MD.Data[1], out mCanBypass.ShortOnLong); bool.TryParse(MD.Data[2], out mCanBypass.LongOnShort); bool.TryParse(MD.Data[3], out mCanBypass.LongOnLong); }
public void Setup(Entities.Entity parent, Loading.ModuleData moduleData) { if (moduleData != null) { mConditions = new Components.Conditional.ConditionChecker(moduleData.mConditionals); mMaxLifetime = moduleData.mLifetime; } SetupInternal(parent, moduleData); }
protected override void SetupInternal(Entities.Entity parent, Loading.ModuleData moduleData) { mParent = (Entities.Unit)parent; foreach (Loading.InfoTagData tag in moduleData.mInfoTags) { if (tag.mType == "AttackBuff") { bool result = int.TryParse(tag.mTagValue, out mAttackBuff); UnityEngine.Debug.Assert(result); } else if (tag.mType == "AttackCostBuff") { bool result = int.TryParse(tag.mTagValue, out mAttackCostBuff); UnityEngine.Debug.Assert(result); } else if (tag.mType == "Status") { mStatus = tag.mTagValue; } } }
protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD) { this.Parent = (Unit)Parent; }
protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD) { }
protected override void SetupInternal(Entities.Entity parent, Loading.ModuleData MD) { this.Parent = (Entities.Unit)parent; mStatusText = MD.Data[0]; this.Parent.AddStatus(mStatusText); }
protected abstract void SetupInternal(Entities.Entity parent, Loading.ModuleData moduleData);
protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD) { this.Parent = (Unit)Parent; this.Parent.AddStatus("Defending"); }
protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD) { mParentEffectEntity = (Entities.Effect_Entity)Parent; mRequiredUnitName = MD.Data[0]; }
protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD) { this.Parent = (Entities.Unit)Parent; mStatus = MD.Data[0]; bool.TryParse(MD.Data[1], out mStatusPersistsThroughTurns); }