This commit is contained in:
2026-05-02 15:18:39 +02:00
parent 8be2cea49a
commit 56d567b77d
19 changed files with 634 additions and 94 deletions

View File

@@ -7,9 +7,19 @@
namespace Game::AGame {
GAME_ENTITY(Player)
private:
Object::Sound mSound;
float mSpeed = 200.f; // Pixels per second
[[maybe_unused]] float mHealth = 100.f;
public:
void setShipTexture(std::shared_ptr<Game::Renderer::Texture> tex);
void setGroundTexture(std::shared_ptr<Game::Renderer::Texture> tex);
void respawnRandomSea(float landBoundaryX);
bool isShipMode() const { return mIsShipMode; }
void onCollisionEnter(Object::Entity* other) override;
private:
Object::Sound mSound;
float mSpeed = 200.f; // Pixels per second
[[maybe_unused]] float mHealth = 100.f;
std::shared_ptr<Game::Renderer::Texture> mShipTex;
std::shared_ptr<Game::Renderer::Texture> mGroundTex;
bool mIsShipMode = true;
float mShoreMargin = 40.f;
END_GAME_ENTITY()
}