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); } }
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); } }
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()); } }
public abstract void Use(Fighter.InputPhase phase);
public abstract bool CanUse(Fighter.InputPhase phase);