public void Initialize(Entity entity) { if (initialized) { return; } initialized = true; ability = abilityCreator.Create(); //ability does not have an entity right now ability.Caster = entity; action = new PlayerAction_UseSkill(ability, contextCreator); }
public override void OnUse() { ability = abilityCreator.Create(); ability.Caster = item.Owner; // ability.GetAbilityComponent<SingleTargetDamage>().baseDamage = item ability.Use(); // SetContext(ctx); // damageFormula.OnAfterDeserialize(); // Debug.Log(damageFormula.Invoke((SingleTargetContext)ctx, baseDamage)); // Debug.Log(damageFormula.Invoke(, (SingleTargetContext)ctx)); }