Browse Source

add pause

main
fdai7184 2 years ago
parent
commit
147f77a7cb
  1. 11
      src/input.c

11
src/input.c

@ -49,11 +49,22 @@ void getInput(){
else if(key=='q'){
printf("quit");
}
else if(key=='p'){
printf("game paused, p to continue");
pause();
printf("game continued");
}
}
}
}
pause(){
while(getch()!='p'){
sleep(1);
}
}
//khbit und getch aus dem Internet

Loading…
Cancel
Save