2024-10-09 02:01:23 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2024-11-14 01:37:16 +01:00
|
|
|
#include "state.h"
|
2024-11-10 01:56:33 +01:00
|
|
|
#include "vmath.h"
|
2024-11-14 00:55:09 +01:00
|
|
|
#include <memory>
|
2024-10-09 02:01:23 +02:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
namespace VISEQ::BASE {
|
|
|
|
|
class Movable{
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Movable() {}
|
|
|
|
|
virtual ~Movable() {}
|
|
|
|
|
|
|
|
|
|
Movable(Vec2Df p, Vec2Df d, float s) : speed(s), position(p), direction(d) {}
|
|
|
|
|
Movable(Vec2Df p, float s) : speed(s), position(p) {}
|
|
|
|
|
|
2024-11-14 00:55:09 +01:00
|
|
|
std::shared_ptr<APP::State> state = APP::State::get();
|
|
|
|
|
|
2024-11-07 00:01:54 +01:00
|
|
|
float speed = 960.0f;
|
2024-11-03 03:48:49 +01:00
|
|
|
|
|
|
|
|
Vec2Df position;
|
|
|
|
|
Vec2Df direction;
|
|
|
|
|
|
|
|
|
|
virtual void setPosition(Vec2Df _position) {position = _position;}
|
|
|
|
|
virtual Vec2Df getPosition() {return position;};
|
|
|
|
|
virtual void update(double frametime) {};
|
|
|
|
|
virtual void update() {};
|
2024-11-13 01:58:44 +01:00
|
|
|
virtual void update(Vec2Df pos) {};
|
2024-11-03 03:48:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|