Files
letnik3koncni-prap/include/game/agame/enemy.hpp
2026-05-13 07:58:59 +02:00

23 lines
653 B
C++

#pragma once
#include <game/gamemanager.hpp>
#include <object/entity.hpp>
#include <renderer/texture.hpp>
#include <renderer/font.hpp>
#include <object/sound.hpp>
namespace Game::AGame {
GAME_ENTITY(Enemy)
public:
void onCollisionEnter(Object::Entity* other) override;
bool hasAdjacentEnemy();
private:
float mMoveSpeedX = 0.f;
float mMoveSpeedY = 0.f;
float mDirectionChangeTimer = 0.f;
float mShoreSpawnCooldown = 0.f;
bool mFollowingPlayer = false;
static constexpr float FOLLOW_DISTANCE = 300.f;
static constexpr float FOLLOW_SPEED = 35.f;
END_GAME_ENTITY()
}