feat: Added basic shooting
This commit is contained in:
@@ -42,8 +42,8 @@ void PlayerInput(SDL_Event *event, Player *player)
|
||||
// shooting
|
||||
player->bulletsLoaded -= 1;
|
||||
player->controls.shot = true;
|
||||
player->shotPos = V2F(mouseBtn.x, mouseBtn.y);
|
||||
printf("shot %f %f\n", mouseBtn.x, mouseBtn.y);
|
||||
player->shotPos = player->world->mouseProjected;
|
||||
printf("shot %f %f\n", player->shotPos.x, player->shotPos.y);
|
||||
} else if(player->reloadTimer == 0) {
|
||||
player->reloadTimer = PLAYER_RELOAD_TIME;
|
||||
printf("reloading\n");
|
||||
|
||||
Reference in New Issue
Block a user