The jump movement was buggy and would jump as many times as space was pressed, resulting in a flying char. When Mike coded the isGrounded bool, it helped some but the animations for them were still buggy. By using a coroutine, we set the WaitForSeconds with prohibited the character from jumping or punching while isGrounded = false and isPunching = true.
Looking at the Unity API, I could see that Coroutines can be paused at a frame, restarted at the same frame, stopped all together and started again.

No comments:
Post a Comment