예제 #1
0
    private void AdjustSpell(ISpellGesture gesture)
    {
        //Adjust the spell (attribute and aim)
        SpellAttribute?attr = gesture.Attribute;

        if (attr.HasValue)
        {
            bool success = CurrentSpell.AdjustAttribute(attr.Value, gesture.AttributePower);
            if (!success)
            {
                Debug.LogWarning("TODO: 'Failed to adjust attribute' SFX/VFX");
            }
        }
        CurrentSpell.AdjustAim(gesture);

        //Start casting the spell if appropriate
        if (State == SpellCastingState.Adjust && gesture.IsCast)
        {
            State = SpellCastingState.Cast;
            CastSpell(gesture);
        }
    }