Ejemplo n.º 1
0
 public AmmoComponent(SerializationInfo info, StreamingContext context)
 {
     Amount             = info.GetValue(nameof(Amount), Amount);
     Template           = AmmoFactory.GetTemplate(info.GetValue(nameof(Template), Template.ID));
     RepairSpeedPercent = info.GetValue(nameof(RepairSpeedPercent), RepairSpeedPercent);
     _damageModStat     = info.GetValue(nameof(_damageModStat), _damageModStat);
     _damagePercent     = info.GetValue(nameof(_damagePercent), _damagePercent);
     _damageModId       = info.GetValue(nameof(_damageModId), _damageModId);
     _skill             = info.GetValue(nameof(_skill), _skill);
 }
Ejemplo n.º 2
0
 public AmmoComponent(AmmoConfig config, string skill, float repairSpeed, BaseStat damageModStat, float damagePercent = 0f)
 {
     Config             = config;
     RepairSpeedPercent = repairSpeed;
     Skill         = skill;
     DamagePercent = damagePercent;
     if (damageModStat == null)
     {
         return;
     }
     DamageModStat = new CachedStat <BaseStat>(damageModStat);
 }
Ejemplo n.º 3
0
 public AmmoComponent(AmmoTemplate template, string skill, float repairSpeed, BaseStat damageModStat, float damagePercent = 0f)
 {
     Template           = template;
     RepairSpeedPercent = repairSpeed;
     _skill             = skill;
     _damageModStat     = new CachedStat <BaseStat>(damageModStat);
     _damagePercent     = damagePercent;
     if (_damageModStat != null)
     {
         Amount.OnResourceChanged += CheckMod;
     }
 }
Ejemplo n.º 4
0
 public DerivedStatModHolder(BaseStat source, float percent)
 {
     _sourceStat = new CachedStat <BaseStat>(source);
     _percent    = percent;
 }
Ejemplo n.º 5
0
 public VitalStatCost(SerializationInfo info, StreamingContext context)
 {
     _amount = info.GetValue(nameof(_amount), _amount);
     _stat   = info.GetValue(nameof(_stat), _stat);
 }
Ejemplo n.º 6
0
 public VitalStatCost(VitalStat stat, float amount)
 {
     _amount = amount;
     _stat   = new CachedStat <VitalStat>(stat);
 }
Ejemplo n.º 7
0
 public StatEntry(string damageType, string id, BaseStat stat)
 {
     Stat       = new CachedStat <BaseStat>(stat);
     DamageType = damageType;
     ID         = id;
 }