public override void Use(Fighter.InputPhase phase)
 {
     if (phase == Fighter.InputPhase.down)
     {
         startUseTime = Time.time;
     }
     else if (phase == Fighter.InputPhase.hold)
     {
         holdToChain?.Use(Fighter.InputPhase.down);
     }
 }
Example #2
0
    public override bool CanUse(Fighter.InputPhase phase)
    {
        if (phase == Fighter.InputPhase.down &&
            HasEnded() &&
            characterComponents.characterSheet.HasResources(cost))
        {
            return(true);
        }

        else
        {
            return(false);
        }
    }
 public override bool CanUse(Fighter.InputPhase phase)
 {
     if (phase == Fighter.InputPhase.hold &&
         IsUsing &&
         holdToChain != null &&
         (Time.time - startUseTime - Fighter.holdDuration) < maxHoldDifference &&
         holdToChain.CanUse(Fighter.InputPhase.down))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #4
0
    public override void Use(Fighter.InputPhase phase)
    {
        if (phase == Fighter.InputPhase.down)
        {
            characterComponents.characterSheet.IncreaseResources(-cost);
            IsUsing = true;

            characterComponents.animator.SetTrigger(AnimationConstants.EnumToID(enableTrigger));
            characterComponents.animator.ResetTrigger(AnimationConstants.EnumToID(disableTrigger));

            if (chargeRoutine != null)
            {
                StopCoroutine(chargeRoutine);
            }
            chargeRoutine = StartCoroutine(ChargeRoutine());
        }
    }
Example #5
0
 public abstract void Use(Fighter.InputPhase phase);
Example #6
0
 public abstract bool CanUse(Fighter.InputPhase phase);