예제 #1
0
        public Ability Clone()
        {
            Ability ab = new Ability();

            ab.ID   = ID;
            ab.name = name;
            ab.icon = icon;
            ab.desp = desp;

            ab.type = type;

            ab.cost      = cost;
            ab.cooldown  = cooldown;
            ab.currentCD = currentCD;

            ab.aStats = aStats.Clone();

            ab.range          = range;
            ab.shootObject    = shootObject;
            ab.shootPosOffset = shootPosOffset;

            ab.moveType = moveType;
            ab.duration = duration;

            ab.launchObj               = launchObj;
            ab.autoDestroyLaunchObj    = autoDestroyLaunchObj;
            ab.launchObjActiveDuration = launchObjActiveDuration;

            return(ab);
        }
예제 #2
0
        public AttackInstance Clone()
        {
            AttackInstance aInstance = new AttackInstance();

            aInstance.srcUnit = srcUnit;

            aInstance.isAOE       = isAOE;
            aInstance.aoeDistance = aoeDistance;
            aInstance.aStats      = aStats.Clone();

            return(aInstance);
        }
예제 #3
0
        //apply effect to all active hostile unit
        void ApplyEffectAll()
        {
            //get all active hostile unit from UnitTracker
            List <Unit> unitList = UnitTracker.GetAllUnitList();

            for (int i = 0; i < unitList.Count; i++)
            {
                //clone the attack stats so that the original value wont get modified when making further calculation
                AttackInstance aInstance = new AttackInstance();
                aInstance.aStats = aStats.Clone();
                unitList[i].ApplyAttack(aInstance);
            }
        }
예제 #4
0
 public AttackStats CloneAttackStats()
 {
     return(aStats.Clone());
 }