Exemple #1
0
        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);
        }
Exemple #2
0
 private InstantKill ModifyInstantKillWithPerkBonus(InstantKill instKill)
 {
     return IsTower() ? PerkManager.ModifyInstantKillWithPerkBonus(instKill.Clone(), unitT.prefabID) : instKill;
 }
Exemple #3
0
 private InstantKill ModifyInstantKillWithPerkBonus(InstantKill instKill)
 {
     return(IsTower() ? PerkManager.ModifyInstantKillWithPerkBonus(instKill.Clone(), prefabID) : instKill);
 }