24 lines
437 B
C++
24 lines
437 B
C++
#pragma once
|
|
|
|
#include "datatypes.h"
|
|
#include "raylib.h"
|
|
|
|
class Movable{
|
|
|
|
public:
|
|
Movable() {}
|
|
virtual ~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(Vec2D<float> *mouse, Camera2D *cam) {};
|
|
|
|
};
|