Answers for "unity dash cooldown"

C#
1

unity dash cooldown

// Very light and easy to use cooldown tool for unity:
// https://github.com/JosepeDev/CooldownAPI

void Dash()
{
  // some dashing behaviour
  ...
  // cooldown activation
  dashCooldown.Activate();
}


if (//if player is pressing the dash button)
{
  // prevent the player from dashing when cooldown active
  if (dashCooldown.IsActive == false) 
  {
    Dash();
  }
}
Posted by: Guest on August-19-2021

C# Answers by Framework

Browse Popular Code Answers by Language