Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
