Пример #1
0
 // 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);
 }
Пример #2
0
 public void AddModule(Loading.ModuleData data)
 {
     if (mModules == null)
     {
         mModules = new List <ModuleData>();
     }
     mModules.Add(data);
 }
Пример #3
0
 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);
 }
Пример #4
0
 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);
 }
Пример #5
0
 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;
         }
     }
 }
Пример #6
0
 protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD)
 {
     this.Parent = (Unit)Parent;
 }
Пример #7
0
 protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD)
 {
 }
Пример #8
0
 protected override void SetupInternal(Entities.Entity parent, Loading.ModuleData MD)
 {
     this.Parent = (Entities.Unit)parent;
     mStatusText = MD.Data[0];
     this.Parent.AddStatus(mStatusText);
 }
Пример #9
0
 protected abstract void SetupInternal(Entities.Entity parent, Loading.ModuleData moduleData);
Пример #10
0
 protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD)
 {
     this.Parent = (Unit)Parent;
     this.Parent.AddStatus("Defending");
 }
Пример #11
0
 protected override void SetupInternal(Entities.Entity Parent, Loading.ModuleData MD)
 {
     mParentEffectEntity = (Entities.Effect_Entity)Parent;
     mRequiredUnitName   = MD.Data[0];
 }
Пример #12
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);
 }