public virtual void Initialize(GameObject target, float duration, float interval, Constants.StatusEffectType statusType, SpecialAbility sourceAbility, int maxStack = 1, Effect onCompleteEffect = null) { this.target = target; this.statusType = statusType; this.sourceAbility = sourceAbility; this.maxStack = maxStack; this.onCompleteEffect = onCompleteEffect; //Debug.Log(onCompleteEffect); targetEntity = target.GetComponent <Entity>(); durationTimer = new Timer(duration, false, CleanUp); intervalTimer = new Timer(interval, true, Tick); }
public List <Status> GetStatusListByType(Constants.StatusEffectType type) { List <Status> results = new List <Status>(); int count = activeStatusList.Count; for (int i = 0; i < count; i++) { if (activeStatusList[i].statusType == type) { results.Add(activeStatusList[i]); } } return(results); }
public EffectStatus(EffectStatus effectStatus) { effectName = effectStatus.effectName; riderTarget = effectStatus.riderTarget; effectType = effectStatus.effectType; deliveryMethod = effectStatus.deliveryMethod; animationTrigger = effectStatus.animationTrigger; //applyToSpecificTarget = effectStatus.applyToSpecificTarget; //targetIndex = effectStatus.targetIndex; riders = effectStatus.CloneRiders(); scaleFromBaseDamage = effectStatus.scaleFromBaseDamage; percentOfBaseDamage = effectStatus.percentOfBaseDamage; damagePerInterval = effectStatus.damagePerInterval; statusType = effectStatus.statusType; stackMethod = effectStatus.stackMethod; maxStack = effectStatus.maxStack; duration = effectStatus.duration; interval = effectStatus.interval; onCompleteEffectName = effectStatus.onCompleteEffectName; affectMoveType = effectStatus.affectMoveType; affectMoveValue = effectStatus.affectMoveValue; knocbackAngle = effectStatus.knocbackAngle; statType = effectStatus.statType; statAdjustmentValue = effectStatus.statAdjustmentValue; modType = effectStatus.modType; switch (deliveryMethod) { case Constants.EffectDeliveryMethod.Melee: meleeDelivery.prefabName = effectStatus.meleeDelivery.prefabName; meleeDelivery.layerMask = effectStatus.meleeDelivery.layerMask; break; case Constants.EffectDeliveryMethod.Projectile: projectileDelivery.prefabName = effectStatus.projectileDelivery.prefabName; projectileDelivery.layerMask = effectStatus.projectileDelivery.layerMask; break; } }
public override void Initialize(GameObject target, float duration, float interval, Constants.StatusEffectType statusType, SpecialAbility sourceAbility, int maxStack = 1, Effect onCompleteEffect = null) { base.Initialize(target, duration, interval, statusType, sourceAbility, maxStack); //targetBrain = target.GetComponent<AIBrain>(); }