13 lines
409 B
C
13 lines
409 B
C
|
#include "raylib.h"
|
||
|
#include "Controls.h"
|
||
|
// Tux Position Varaibles
|
||
|
float TuxPos_x = 32.0f, TuxPos_y = 62.0f;
|
||
|
// Controls
|
||
|
int Func_Controls()
|
||
|
{
|
||
|
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;}
|
||
|
}
|