raycast start

This commit is contained in:
2025-10-04 17:36:47 +01:00
parent a6266a336b
commit 31ba002ac7
5 changed files with 59 additions and 11 deletions

View File

@@ -3,6 +3,7 @@
void PlayerUpdate(SDL_Event *event, Player *player)
{
SDL_KeyboardEvent key = event->key;
SDL_MouseButtonEvent mouseBtn = event->button;
if (key.key == SDLK_W)
{
player->pos.y += 10;
@@ -19,4 +20,9 @@ void PlayerUpdate(SDL_Event *event, Player *player)
{
player->pos.y -= 10;
}
if (mouseBtn.clicks == 1)
{
// shooting
player->bulletsLoaded -= 1;
}
}