increase game speed with keydown
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "tc_input.h"
|
||||
#include "m_tetromino.h"
|
||||
#include "raylib.h"
|
||||
#include "tc_settings.h"
|
||||
|
||||
/* Was having issues with raylib input, wasn't having these
|
||||
issues before but I figured out that I can just cast to
|
||||
@@ -15,6 +16,13 @@ void TC_Process_Input_Per_Tick(void) {
|
||||
} else if ((char)IsKeyDown(KEY_D)) {
|
||||
M_T_Move_Tetromino_Right();
|
||||
}
|
||||
|
||||
/* Not sure I actually wanna handle this like this */
|
||||
if ((char)IsKeyDown(KEY_S)) {
|
||||
TC_Set_Game_Speed(1);
|
||||
} else if ((char)IsKeyUp(KEY_S)) {
|
||||
TC_Reset_Game_Speed();
|
||||
}
|
||||
}
|
||||
|
||||
void TC_Process_Input_Per_Frame(void) {
|
||||
|
||||
Reference in New Issue
Block a user