Browse Source

add pause

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

11
src/input.c

@ -49,8 +49,19 @@ void getInput(){
else if(key=='q'){ else if(key=='q'){
printf("quit"); printf("quit");
} }
else if(key=='p'){
printf("game paused, p to continue");
pause();
printf("game continued");
}
}
}
} }
pause(){
while(getch()!='p'){
sleep(1);
} }
} }

Loading…
Cancel
Save