This commit is contained in:
2026-05-13 07:58:59 +02:00
parent d9769bdbbb
commit 892d8f22eb
18 changed files with 242 additions and 77 deletions

View File

@@ -11,15 +11,20 @@ namespace Game::AGame {
void Trash::update(float deltaTime) {
(void)deltaTime;
if (mSeaOnly) {
/*if (mSeaOnly) {
const float landBoundaryX = GameManager::getSharedData<float>("terrainLandBoundaryX");
const float margin = 25.f;
const float halfWidth = getTexture() ? getTexture()->getWidth() * mTransform.adjustedScaleX() / 2.f : 0.f;
if (mTransform.x - halfWidth < landBoundaryX + margin) {
mTransform.x = landBoundaryX + margin + halfWidth;
}
}
return;
}*/
// Naključno premikanje
mTransform.x += static_cast<float>(Utils::getUtils().rirng32(-50, 50)) * deltaTime;
mTransform.y += static_cast<float>(Utils::getUtils().rirng32(-50, 50)) * deltaTime;
//return;
}
void Trash::onCollisionEnter(Object::Entity* other) {