I’m working on a C# console game for a school project and I’m wondering if there is a way to basically just skip a Console.ReadKey()
after some time?
I want to make a prescission minigame where you have to press the correct key in a small time frame after it pops up somewhere on the screen. If the key hit is correct, points will increase, but if the key press is incorrect or not pressed in the time frame, then the points will not be increased, and the next key would pop up. I know how to make the score counter, I just don’t know how I could maybe make the ReadKey return null or just literally skip it after a custom time frame if it hasn’t received input, for example for 800 miliseconds.
I wanted to create a solution where an aoutomatic keypress would happen after that custom time frame, one that is not in the list of possible keys popping up on the screen, thus wrong keypress, thus no point. I sadly couldn’t figure out how to do this just in code.