#include "player.h" #include "world.h" #include "config.h" #include "raylib.h" // let's a go! float curhorvel=0.0f; //current horizonatal velocity bool dir=0; void UpdatePlayerControls(void) { // if there isn't a player, you probably can't do much if (!player){ return; } if(curhorvel==0.0f){ curhorvel=65.5f*scale; } // if a key pressed, push player to the left if (IsKeyDown(KEY_A)) { dir=1; if(curhorvelvelocity.y = 0; ApplyForce( player, (Vector2){0, -JUMP_FORCE} ); } }