2d_patformer/enemy.hpp
2026-01-09 10:21:48 +00:00

25 lines
521 B
C++

#pragma once
#include <SFML/Graphics.hpp>
class Enemy {
private:
sf::RectangleShape shape;
float leftBound;
float rightBound;
float speed;
bool movingRight;
bool aggro;
float platformY;
public:
Enemy(float x, float y, float leftB, float rightB);
void update(float dt, const sf::Vector2f& playerPos);
void draw(sf::RenderWindow& window);
void setAggro(bool value);
float getPlatformY() const;
sf::FloatRect getBounds() const;
sf::RectangleShape& getShape();
};