From 918e33f8cf77036b0b87ca03aa10d9954b6569e1 Mon Sep 17 00:00:00 2001 From: realtradam Date: Sat, 11 May 2024 17:45:52 -0400 Subject: player moves on their own --- src/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 4b6bd66..3c92fce 100644 --- a/src/main.c +++ b/src/main.c @@ -53,7 +53,7 @@ Rectangle dst={0.0f,0.0f,32.0f,32.0f}; Player player_one = { .position = { 0 }, .direction = { 1, 0, 0 }, - .speed = 0 + .speed = 1.0f/60.0f }; //------------------------------------------------------------------------------------ @@ -98,6 +98,8 @@ int main(void) //----------------------------------------------------- updateController(); + movePlayer(&player_one); + // Update //---------------------------------------------------------------------------------- //UpdateCamera(&camera, CAMERA_ORBITAL); @@ -107,15 +109,13 @@ int main(void) //---------------------------------------------------------------------------------- BeginDrawing(); - ClearBackground(BLACK); + ClearBackground(DARKGRAY); BeginMode3D(camera); drawPlayer(&player_one); - //DrawModel(model, position, 2.0f, WHITE); - - // Draw cube with an applied texture + // Draw cube with an applied texture //test(); // Draw cube with an applied texture, but only a defined rectangle piece of the texture //DrawCubeTextureRec(texture, (Rectangle){ 0, texture.height/2, texture.width/2, texture.height/2 }, -- cgit v1.2.3