private IEnumerator Dash()
{
source.PlayOneShot(dash);
isDashing = true;
canDash = false;
float originalGravity = rb.gravityScale;
rb.gravityScale = 0f;
rb.velocity = new Vector2(transform.localScale.x * dashingPower, 0f);
tr.emitting = true;
yield return new WaitForSeconds(dashingTime);
tr.emitting = false;
rb.gravityScale = originalGravity;
isDashing = false;
yield return new WaitForSeconds(dashingCooldown);
canDash = true;
}
My current dash script just wait before responding because I will send some screen shots of other data aswell
