RW2026 - Abans d'anar li vaig dir a Claude que arreglara coses de input i game pq pareixia que al disparar es perdien inputs
This commit is contained in:
1 parent
c610065fe0
commit
c35889a840
4 files changed
+28
-4
No files matched your search
@@ -984,9 +984,9 @@ void Game::run() {
|
||||
|
||||
while (Section::name == Section::Name::GAME) {
|
||||
const float DELTA_TIME = calculateDeltaTime();
|
||||
handleEvents();
|
||||
checkInput();
|
||||
update(DELTA_TIME);
|
||||
handleEvents(); // Tiene que ir antes del render
|
||||
render();
|
||||
}
|
||||
}
|
||||
@@ -1128,6 +1128,7 @@ auto Game::allPlayersAreNotPlaying() -> bool {
|
||||
|
||||
// Comprueba los eventos que hay en cola
|
||||
void Game::handleEvents() {
|
||||
input_->resetJustPressed();
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event)) {
|
||||
switch (event.type) {
|
||||
|
||||
Reference in new issue
Block a user