entity destruction, etc.

This commit is contained in:
2026-03-15 19:22:20 +01:00
parent 2983b919cd
commit d522881358
6 changed files with 101 additions and 47 deletions

View File

@@ -37,5 +37,8 @@ namespace Game::AGame {
} else if (playerY > bottomBound) {
Object::Camera::getInstance().move(0.f, mSpeed * deltaTime);
}
const bool* state = SDL_GetKeyboardState(nullptr);
mSpeed = state[SDL_SCANCODE_LSHIFT] ? 400.f : 200.f;
}
}

View File

@@ -33,5 +33,6 @@ namespace Game::AGame {
if (state[SDL_SCANCODE_S]) mTransform.y += mSpeed * deltaTime;
if (state[SDL_SCANCODE_A]) mTransform.x -= mSpeed * deltaTime;
if (state[SDL_SCANCODE_D]) mTransform.x += mSpeed * deltaTime;
mSpeed = state[SDL_SCANCODE_LSHIFT] ? 400.f : 200.f;
}
}