public Buff(BuffGrantNode buffNode, IBehaviourContext context) { buffTemplate = buffNode.BuffToApply; buffTemplate.SetupGraph(this); buffInput = buffTemplate.GetNode <BuffInputNode>(); buffInput.Target[this].Value = buffNode.Target[context].Value; BaseStackSize.onChanged += RecalculateStackSize; OnRemove += () => { buffTemplate.RemoveGraph(this); }; buffInput.SetTarget(this, this); }
public Buff(BuffTemplate _buffTemplate, RPGCharacter _target, BuffClock baseClock) { buffTemplate = _buffTemplate; buffTemplate.SetupGraph(this); buffInput = buffTemplate.GetNode <BuffInputNode>(); buffInput.Target.GetEntry(this).Value = _target; AddClock(baseClock); BaseStackSize.onChanged += RecalculateStackSize; OnRemove += () => { buffTemplate.RemoveGraph(this); }; buffInput.SetTarget(this, this); }