ECS with entt

This commit is contained in:
Erris
2026-02-17 00:50:43 +01:00
parent 86392e0790
commit d4c420d5b4
30 changed files with 1314 additions and 222 deletions

View File

@@ -0,0 +1,27 @@
#ifndef NATIVE_SCRIPTABLE_ENTITY_HPP
#define NATIVE_SCRIPTABLE_ENTITY_HPP
#include "open_engine/scene/entity.hpp"
namespace OpenEngine {
class NativeScriptableEntity
{
public:
virtual ~NativeScriptableEntity() = default;
template <typename T>
T& GetComponent() { return entity.GetComponents<T>(); };
protected:
virtual void OnCreate() {};
virtual void OnUpdate() {};
virtual void OnDestroy() {};
private:
Entity entity;
friend class Scene;
};
}
#endif // NATIVE_SCRIPTABLE_ENTITY_HPP