Entity update + components

This commit is contained in:
2026-03-24 09:00:23 +01:00
parent 0c0e7c41af
commit 8f2a4e9ecb
11 changed files with 197 additions and 7 deletions

View File

@@ -24,8 +24,7 @@ namespace Game::AGame {
}
void Background::update(float deltaTime) {
if (!mIsActive) return;
return;
/*const bool* state = SDL_GetKeyboardState(nullptr);
if (state[SDL_SCANCODE_P]) {
mTransform.scaleX *= 2.f;

View File

@@ -26,7 +26,6 @@ namespace Game::AGame {
}
void Player::update(float deltaTime) {
if (!mIsActive) return;
//mTransform.rotation += 1.f; // Rotate clockwise for testing
//mTransform.scaleX = 1.f + 1.f * std::sin(RUNNING_TIME() / 0.5f); // Pulsate scale for testing
//mTransform.scaleY = 1.f + 0.5f * std::cos(RUNNING_TIME() / 0.5f); // Pulsate scale for testing

11
src/game/agame/trash.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include <game/agame/trash.hpp>
namespace Game::AGame {
void Trash::start() {
mZIndex = 50;
}
void Trash::update(float deltaTime) {
return;
}
}