Upload files to "/"
This commit is contained in:
parent
43739633b8
commit
3a493c1485
4 changed files with 246 additions and 17 deletions
25
enemy.hpp
Normal file
25
enemy.hpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#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();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue