Last active
July 11, 2018 22:23
-
-
Save mwchase/7cc01a5103b0538ff76685007a21c3ea to your computer and use it in GitHub Desktop.
## So, suppose we have a platformer character with one-way platforms, cancelable wall slides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## So, suppose we have a platformer character with one-way platforms, cancelable wall slides | |
Platform Collisions | |
On A Platform | |
## To jump, set the vertical velocity to JUMP_START | |
jump -> Going Up | |
walk off edge -> Falling | |
Airborne | |
collide with wall? -> Wallslide | |
Going Up | |
reach apex? -> Falling | |
hit ceiling? -> Falling | |
pass through one-way platform? -> Going Up | |
Falling | |
collide with platform? -> On A Platform | |
Wallslide | |
cancel -> Falling | |
jump -> Going Up | |
reach bottom? -> At Bottom Of Wall? | |
At Bottom Of Wall? | |
platform? -> On A Platform | |
no platform? -> Falling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render(model){ | |
let current_state_name = model.active_states[0].name; | |
return $("h1", | |
{style: {color: "darkBlue"}}, | |
`The current state is: ${current_state_name}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment