Answered step by step
Verified Expert Solution
Link Copied!

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: gameChar_y is less than floorPos_y when this is happening.
- As the action of the if statement you should make the character fall towards the ground.
- Do this by incrementing gameChar_y
- 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions