deltatime
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user