public UnitStat Clone() { UnitStat stat = new UnitStat(); stat.damageMin = damageMin; stat.damageMax = damageMax; stat.clipSize = clipSize; stat.reloadDuration = reloadDuration; stat.range = range; stat.aoeRadius = aoeRadius; stat.crit = crit.Clone(); stat.stun = stun.Clone(); stat.slow = slow.Clone(); stat.dot = dot.Clone(); stat.buff = buff.Clone(); stat.buildDuration = buildDuration; stat.unBuildDuration = unBuildDuration; stat.shootObjectT = shootObjectT; stat.desp = desp; stat.electricityMaxStored = electricityMaxStored; stat.electricityRegenerationRate = electricityRegenerationRate; stat.electricityReceiveRate = electricityReceiveRate; stat.electricityNeedForShoot = electricityNeedForShoot; for (int i = 0; i < rscGain.Count; i++) { stat.rscGain.Add(rscGain[i]); } for (int i = 0; i < cost.Count; i++) { stat.cost.Add(cost[i]); } return(stat); }
public UnitStat Clone() { UnitStat stat = new UnitStat(); stat.damageMin = damageMin; stat.damageMax = damageMax; stat.clipSize = clipSize; stat.reloadDuration = reloadDuration; stat.minRange = minRange; stat.range = range; stat.aoeRadius = aoeRadius; stat.hit = hit; stat.dodge = dodge; stat.shieldBreak = shieldBreak; stat.shieldPierce = shieldPierce; stat.damageShieldOnly = damageShieldOnly; stat.crit = crit.Clone(); stat.stun = stun.Clone(); stat.slow = slow.Clone(); stat.dot = dot.Clone(); stat.instantKill = instantKill.Clone(); stat.buff = buff.Clone(); stat.buildDuration = buildDuration; stat.unBuildDuration = unBuildDuration; stat.shootObjectT = shootObjectT; stat.desp = desp; //stat.despGeneral=despGeneral; //for(int i=0; i<rscGain.Count; i++) stat.rscGain.Add(rscGain[i]); //for(int i=0; i<cost.Count; i++) stat.cost.Add(cost[i]); stat.rscGain = new List <int>(rscGain); stat.cost = new List <int>(cost); return(stat); }
public AbilityEffect Clone() { AbilityEffect eff = new AbilityEffect(); eff.duration = duration; eff.damageMin = damageMin; eff.damageMax = damageMax; eff.stunChance = stunChance; eff.slow = slow.Clone(); eff.dot = dot.Clone(); eff.slow.duration = eff.duration; eff.dot.duration = eff.duration; eff.damageBuff = damageBuff; eff.rangeBuff = rangeBuff; eff.cooldownBuff = cooldownBuff; eff.HPGainMin = HPGainMin; eff.HPGainMax = HPGainMax; return(eff); }
public UnitStat Clone() { UnitStat stat = new UnitStat(); stat.damageMin = damageMin; stat.damageMax = damageMax; stat.cooldown = cooldown; stat.range = range; stat.aoeRadius = aoeRadius; stat.crit = crit.Clone(); stat.stun = stun.Clone(); stat.slow = slow.Clone(); stat.dot = dot.Clone(); stat.buff = buff.Clone(); stat.buildDuration = buildDuration; stat.unBuildDuration = unBuildDuration; stat.shootObjectT = shootObjectT; stat.desp = desp; stat.rscGain = rscGain; stat.cost = cost; return(stat); }
private Slow ModifySlowWithPerkBonus(Slow slow) { return IsTower() ? PerkManager.ModifySlowWithPerkBonus(slow.Clone(), unitT.prefabID) : slow; }
private Slow ModifySlowWithPerkBonus(Slow slow) { return(IsTower() ? PerkManager.ModifySlowWithPerkBonus(slow.Clone(), prefabID) : slow); }