コード例 #1
0
        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);
        }
コード例 #2
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);
        }
コード例 #3
0
        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);
        }