Mario: simple jump

This commit is contained in:
2021-05-22 23:54:01 +02:00
parent d9a88f2de2
commit 930875ccf8
3 changed files with 47 additions and 3 deletions
+3 -1
View File
@@ -35,6 +35,7 @@ void handleKeyDown( SDL_Keycode key, SDLPP::Scene &scene ) {
break;
case SDLK_SPACE:
case SDLK_w:
mario->jump();
break;
case SDLK_s:
break;
@@ -54,8 +55,9 @@ void handleKeyUp( SDL_Keycode key ) {
case SDLK_d:
mario->walkLeft();
break;
case SDLK_SPACE:
case SDLK_w:
case SDLK_s:
mario->stopJump();
default:
break;
}