I am making a 2d android platformer game and it that there is a button for DASH(which is just normal speed * 5) .The button works perfectly but the thing is I want the button to be used for only about 5 times in the whole level or else the game will be too easy. And also i want to display the number of times left which i can use it…Please help out if anyone knows this
THE CODE FOR DASH IS:
if (dash == true)
{
rb.velocity = Vector2.right * dashSpeed;
}
and dash button is on the screen and dashspeed = 5 and i also have a flip function so direction is not a problem for me