/// <summary> /// Begin targeting logic /// </summary> void BeginTargeting() { _step = Stages.Targeting; _targets = new TargetCollection(); _macro = _spell.TargetMacro; _macro.SetData(this); _macro.Run(); }
/// <summary> /// BeginTargeting done logic. /// </summary> public void TargetingDone(TargetCollection targets) { /* * Store the time and the point at the instant the targeting was done and check for the spell type, if it is an instant spell, immediately cast it * otherwise, begin the casting logic */ _macro = null; // Let GC collect the target macro we used _castBeginningTime = Time.timeSinceLevelLoad; _castBeginPoint = _caster.transform.position; _spell.OnTargetingDone(); if (_spell.IsInstant) { CastDone(); } else { StartCast(); } }
public void TargetingFail(TargetingError error) { _macro = null; Clear(Stages.Failed); }