Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • wise2023_jumpnrun/jumpnrun
1 result
Show changes
Commits on Source (2)
......@@ -13,25 +13,26 @@ Nachbedingung: Position des Characters hat sich je nach Tasteneingabe verändert
void jump(int input){
switch(input) {
case SDL_SCANCODE_L:
case SDL_SCANCODE_D: //right
if(player->x < 770){ // Überprüfe Grenzen
player->x += ROW_SIZE;
}
break;
case SDL_SCANCODE_J:
case SDL_SCANCODE_A: //left
if(player->x > 30){ // Überprüfe Grenzen
player->x -= ROW_SIZE;
}
break;
case SDL_SCANCODE_K:
case SDL_SCANCODE_S: //down
if(player->y < 820){ // Überprüfe Grenzen
playerscore--;
player->y += ROW_SIZE;
}
break;
case SDL_SCANCODE_I:
case SDL_SCANCODE_W: //up
if(player->y >120){ // Überprüfe Grenzen
playerscore++;
......@@ -41,7 +42,7 @@ void jump(int input){
player->y -= ROW_SIZE;
}
break;
case SDL_SCANCODE_U:
case SDL_SCANCODE_Q: // Taste q => gehe nach oben links
if(player->y >120 && player->x > 30){ // Überprüfe Grenezen
playerscore++;
......@@ -52,7 +53,7 @@ void jump(int input){
player->x -= ROW_SIZE;
}
break;
case SDL_SCANCODE_O:
case SDL_SCANCODE_E: // Taste e => gehe nach oben rechts
if(player->y >120 && player->x < 770){ // Überprüfe Grenzen
playerscore++;
......