deltatime

This commit is contained in:
2026-03-12 21:23:31 +01:00
parent 74159a6fda
commit 4c07694a25
7 changed files with 28 additions and 13 deletions

View File

@@ -4,7 +4,7 @@ namespace Game::AGame {
void Player::start() {
LOG("Created the Player");
if (mTex && mTex->getId() == "Arial") {
if (mTex && mTex->getId() == "Roboto") {
LOG("Player texture is a font");
// Treat as Font and build it
std::shared_ptr<Renderer::Font> font = std::dynamic_pointer_cast<Renderer::Font>(mTex);
@@ -16,10 +16,12 @@ namespace Game::AGame {
}
}
void Player::update() {
void Player::update(float deltaTime) {
if (!mIsActive) return;
//LOG("Updated Player");
mTransform.x += 0.5f; // Move right at a constant speed for testing
mTransform.x += 1.f; // Move right at a constant speed for testing
mTransform.rotation += 1.f; // Rotate clockwise for testing
//LOG(mName << " position: " << mTransform.x << ' ' << mTransform.y);
//LOG("DeltaTime: " << deltaTime);
}
}