You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
473 B
26 lines
473 B
#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
|
|
|