RPG/include/Ent.h
2024-02-22 00:32:57 -08:00

46 lines
583 B
C++

#pragma once
#include "Obj.h"
#include "Vec2.h"
#include <vector>
class Com;
class Ent : public Obj
{
private:
std::vector<Com*> coms;
Vec2 pos;
public:
Ent();
Ent(std::string id);
Ent(Ent&& ent) noexcept;
Ent(const Ent& ent);
Ent& operator=(Ent&& ent) noexcept;
Ent& operator=(const Ent& ent);
bool HasCom(size_t hashId);
bool HasCom(const std::string& id);
bool AddCom(Com* newCom);
Com* GetCom(size_t hashId) const;
Com* GetCom(const std::string& id) const;
void SetPos(const Vec2& newPos);
Vec2 GetPos() const;
void Update();
void Render();
};