public float GetDamage(OldContext context) { if (formula == null) { return(baseValue); } return(formula.Invoke(context, baseValue)); }
public override List <Context> Collect(CharacterAction <SingleTargetContext> action, Entity entity) { float radius = SearchRange.Invoke(entity); int factionMask = FactionMask.Invoke(entity); List <Entity> targets = EntityManager.Instance.FindEntitiesInRange(entity.transform.position, radius, factionMask); List <Context> retn = new List <Context>(targets.Count); for (int i = 0; i < retn.Count; i++) { retn.Add(new SingleTargetContext(entity, targets[i])); } return(retn); }
public override void ApplyModifier(ref float inValue) { // while testing // if(debugMode) formula.OnAfterDeserialize(); inValue = formula.Invoke((SingleTargetContext)this.context, inValue + test); }