30 lines
519 B
C++
30 lines
519 B
C++
#ifndef ENTITYBASE_HPP
|
|
#define ENTITYBASE_HPP
|
|
|
|
#include "../../include/raylib-cpp.hpp"
|
|
#include "../render/textures.hpp"
|
|
#include <functional>
|
|
#include <sys/types.h>
|
|
#include <stdio.h>
|
|
|
|
struct Entity;
|
|
|
|
|
|
using ControllerFunc = std::function<void(Entity&)>;
|
|
|
|
struct Entity {
|
|
ID id;
|
|
raylib::Vector2 position;
|
|
int health;
|
|
int maxhealth;
|
|
std::string nametag;
|
|
ControllerFunc controller;
|
|
void Update();
|
|
void Draw();
|
|
|
|
Entity(ID Id, int x, int y, std::string &n, int h, int maxh);
|
|
|
|
};
|
|
|
|
#endif //ENTITYBASE_HPP
|