public override void FrameFeed() { if (staminaComponent == null) { staminaComponent = agent.RequestComponent <CharacterStaminaComponent>(); } agent.navMeshAgent.speed = AgentSpeed(); MoveAgent(); }
public override void FrameFeed() { if (moveComponent == null || staminaComponent == null) { moveComponent = agent.RequestComponent <CharacterMovementComponent>(); staminaComponent = agent.RequestComponent <CharacterStaminaComponent>(); return; } if (InputConfig.Dash() && CanDash && moveComponent.isMoving) { staminaComponent.ConsumeStamina(agent.dashStaminaCost); agent.ChangeState <CharacterDashState>(); } }