Modify 2D Platformer Microgame to enable Double Jump

I am using the Unity 2D Platformer Microgame and I would like to expand the jumping behaviour to allow for double jumping. I have looked online for solutions yet I couldn’t find one that used the Platformer Microgame’s code. Is there any way to do this? Thanks in advance

You won’t ever find such a specific thing in a specific project. The point is that you learn how to do it, not just copy paste code and there are lots of online tutorials showing you the logic of it. Typing in “double jump in unity” into Google gives you a bunch.

I definitely understand what you mean. I first attempted to code it myself but failed. I then Googled exactly what you suggested and watched a bunch of tutorials, all of them with a simplified version of the jumping method (no Enum, no Schedule, etc.). I tried to mimic this with what I am working with, but couldn’t again. That’s when I Googled the specific problem to see if someone else had ever been in my situation and, as a last resort, opened this thread here. I am failing to see where to add the extra If statement that validates the possibility of an extra jump.

Do it in layers. DO NOT move on beyond any number until you have it working. This is engineering iteration.

  1. identify where the jump input is detected

  2. identify the mechanism that causes the player to jump

  3. without interfering with that, make something that prints “double jump” if you press jump while airborne

  4. add a counter that: a) resets to zero when you land, and b) counts up when you jump (print this counter out!)

Now you have created all the parts necessary.

Now you can connect this second (but not third!) jump intention to repeat the jump mechanism.

This method helped me a lot! Thank you so much!