- Set initial position of the character and reset falling speed to 0.
- Always increase falling speed, so that he falls faster the longer he is falling.
- If he touches the trampoline, multiply falling speed by a negative number to reverse the direction of falling.
- Make sure that he doesn't fall through the trampoline by resetting his position
- Always change y position by the negative of the falling speed. This is because a positive falling speed means he will be going down (-y), not up.
- View Demo
- Download the Save File
- See Game Implementation
|
|