Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Now it's time to make our game character fall down to the ground again - Add an if statement within the draw function to detect
Now it's time to make our game character fall down to the ground again
Add an if statement within the draw function to detect when the character is jumping above the ground.
HINT: gameChary is less than floorPosy when this is happening.
As the action of the if statement you should make the character fall towards the ground.
Do this by incrementing gameChary
At the same time set isFalling to true so that the falling image of the character appears
Finally add an else action to your conditional statement which sets isFalling to false. This will stop the falling image from appearing when your character is touching the ground again
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started