Example #1
0
 /// <summary>
 /// Begin targeting logic
 /// </summary>
 void BeginTargeting()
 {
     _step    = Stages.Targeting;
     _targets = new TargetCollection();
     _macro   = _spell.TargetMacro;
     _macro.SetData(this);
     _macro.Run();
 }
Example #2
0
 /// <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();
     }
 }
Example #3
0
 public void TargetingFail(TargetingError error)
 {
     _macro = null;
     Clear(Stages.Failed);
 }