"So in case I want to press the Up,Up,Up 3 times where upon pressing each Up, I want a UI corresponding to each UP pressed to become visible, how do I achieve that?" - Since this works as a buffer, just do three checks using InputBufferPress
. If VK_UP
is pressed once, trigger one action; if pressed twice, trigger another; and if pressed three times, trigger a third action.
As for "Also, how can I make the UI invisible if the player is not quick enough to press the buttons in succession?", that’s a less standard situation. You’ll need to build the logic yourself depending on how you handle the UI and its visibility triggers.