public void Update(float deltaTime) { if (!SpellCastStarted) { return; } if (SpellCastCompleted) { return; } if (SpellCastCancelled) { return; } CurrentCastTime += deltaTime * Caster.System.AttributeSystem.Haste.Remap(); Spell.UpdateCast(this); OnSpellCastProgress?.Invoke(this); if (CurrentCastTime >= Spell.CastTime) { Spell.CompleteCast(this); SpellCastCompleted = true; OnSpellCompleted?.Invoke(this); } }
public void Start() { if (SpellCastStarted) { return; } Spell.StartCast(this); SpellCastStarted = true; OnSpellCastStarted?.Invoke(this); if (Spell.CastTime > 0) { return; } Spell.CompleteCast(this); SpellCastCompleted = true; OnSpellCompleted?.Invoke(this); }