Restore original example.

This commit is contained in:
Reece Mackie 2019-04-25 19:28:44 +01:00
parent da79bc0dd4
commit cbfe8b1ce1

View File

@ -38,8 +38,9 @@ void App::Update()
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
//posX += gamepadAxisState[GAMEPAD_PLAYER1][GAMEPAD_XBOX_AXIS_LEFT_X] * 5; posX += GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_XBOX_AXIS_LEFT_X) * 5;
//posY += gamepadAxisState[GAMEPAD_PLAYER1][GAMEPAD_XBOX_AXIS_LEFT_Y] * -5; posY += GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_XBOX_AXIS_LEFT_Y) * -5;
DrawRectangle(posX, posY, 400, 100, RED); DrawRectangle(posX, posY, 400, 100, RED);
DrawLine(0, 0, GetScreenWidth(), GetScreenHeight(), BLUE); DrawLine(0, 0, GetScreenWidth(), GetScreenHeight(), BLUE);
@ -50,13 +51,13 @@ void App::Update()
if (IsKeyDown(KEY_S)) DrawCircle(100, 100, 100, BLUE); if (IsKeyDown(KEY_S)) DrawCircle(100, 100, 100, BLUE);
if (IsKeyPressed(KEY_A) || IsGamepadButtonPressed(0, GAMEPAD_XBOX_BUTTON_LEFT)) if (IsKeyPressed(KEY_A))
{ {
posX -= 50; posX -= 50;
EnableCursor(); EnableCursor();
} }
if (IsKeyPressed(KEY_D) || IsGamepadButtonPressed(0, GAMEPAD_XBOX_BUTTON_RIGHT)) if (IsKeyPressed(KEY_D))
{ {
posX += 50; posX += 50;
DisableCursor(); DisableCursor();