You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
473 B
C
27 lines
473 B
C
3 years ago
|
#ifndef ENTITY_H
|
||
|
#define ENTITY_H
|
||
|
|
||
|
#include "scenenode.h"
|
||
|
|
||
|
#include <SFML/System.hpp>
|
||
|
|
||
|
class Entity : public SceneNode
|
||
|
{
|
||
|
public:
|
||
|
explicit Entity();
|
||
|
virtual ~Entity() = 0;
|
||
|
|
||
|
void setVelocity(sf::Vector2f vel);
|
||
|
void setVelocity(float vx, float vy);
|
||
|
const sf::Vector2f& velocity() const;
|
||
|
void accelerate(sf::Vector2f vel);
|
||
|
|
||
|
|
||
|
private:
|
||
|
sf::Vector2f vector_velocity;
|
||
|
|
||
|
virtual void updateCurrent(const sf::Time& dt) override;
|
||
|
};
|
||
|
|
||
|
#endif // ENTITY_H
|