42 lines
849 B
C++
42 lines
849 B
C++
#pragma once
|
|
|
|
#include "state.h"
|
|
#include "vmath.h"
|
|
#include <memory>
|
|
|
|
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) {}
|
|
|
|
std::shared_ptr<APP::State> state = APP::State::get();
|
|
|
|
float speed = 960.0f;
|
|
|
|
Vec2Df position;
|
|
Vec2Df direction;
|
|
|
|
bool in_rect = false;
|
|
|
|
bool hover_connect = false;
|
|
bool connecting = false;
|
|
bool selected = false;
|
|
bool highlighted = false;
|
|
bool copied = false;
|
|
|
|
bool erase = false;
|
|
|
|
virtual void setPosition(Vec2Df _position) {position = _position;}
|
|
virtual Vec2Df getPosition() {return position;};
|
|
virtual void update(double frametime) {};
|
|
virtual void update() {};
|
|
virtual void update(Vec2Df pos) {};
|
|
};
|
|
|
|
}
|