#ifndef ENTITYBASE_HPP
#define ENTITYBASE_HPP

#include "../../include/raylib-cpp.hpp"
#include "../render/textures.hpp"
#include <functional>
#include <sys/types.h>
#include <iostream>

struct Entity;


using ControllerFunc = std::function<void(Entity&, float)>;

struct Entity {
  ID id;
  ID spriteid;
  raylib::Rectangle rect;
  int health;
  int maxhealth;
  std::string nametag;
  ControllerFunc controller;
  Vector2 velocity;
  void Update(float deltatime);
  void Draw();

  Entity(ID Id, raylib::Rectangle rect, std::string n, int h, int maxh);

};

#endif //ENTITYBASE_HPP
