Tux_Vs_X_ENGINE/src/Controls.c

14 lines
349 B
C
Raw Normal View History

2021-08-28 22:48:16 +00:00
#include "raylib.h"
2021-09-12 19:23:15 +00:00
#include "Main.h"
2021-08-28 22:48:16 +00:00
#include "Controls.h"
2021-08-28 22:48:16 +00:00
// Controls
void Controls()
2021-08-28 22:48:16 +00:00
{
if (IsKeyDown(KEY_LEFT)) TuxPos_x -= GetFrameTime() * 800.0f;
if (IsKeyDown(KEY_RIGHT)) TuxPos_x += GetFrameTime() * 800.0f;
if (IsKeyDown(KEY_UP)) TuxPos_y -= GetFrameTime() * 800.0f;
if (IsKeyDown(KEY_DOWN)) TuxPos_y += GetFrameTime() * 800.0f;
2021-08-28 22:48:16 +00:00
}