22 lines
424 B
C++
22 lines
424 B
C++
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "SFML/Graphics/RenderWindow.hpp"
|
||
|
|
#include "datatypes.h"
|
||
|
|
|
||
|
|
class Movable{
|
||
|
|
|
||
|
|
public:
|
||
|
|
Movable(){}
|
||
|
|
Movable(Vec2D<float> p, Vec2D<float> d, float s) : speed(s), position(p), direction(d) {}
|
||
|
|
Movable(Vec2D<float> p, float s) : speed(s), position(p) {}
|
||
|
|
|
||
|
|
float speed = 1.0f;
|
||
|
|
|
||
|
|
Vec2D<float> position;
|
||
|
|
Vec2D<float> direction;
|
||
|
|
|
||
|
|
virtual void update() {};
|
||
|
|
virtual void draw(sf::RenderWindow *window) {};
|
||
|
|
|
||
|
|
};
|