Formatted EVERYTHING

This commit is contained in:
Dynamitos committed 2024-06-09 12:20:53 +02:00
1 parent f18bf8acbe
commit d95dab850c
265 files changed
+8002 -12310

No files matched your search

+10 -20
View File
@@ -1,33 +1,23 @@
#pragma once
#include <entt/entt.hpp>
#include "MinimalEngine.h"
#include "Scene/Scene.h"
namespace Seele
{
#include <entt/entt.hpp>
namespace Seele {
// An entity describes a part of a scene
// It is just a wrapper the ID of a registry
class Entity
{
public:
class Entity {
public:
Entity(PScene scene);
virtual ~Entity();
template<typename Component, typename... Args>
Component& attachComponent(Args&&... args)
{
template <typename Component, typename... Args> Component& attachComponent(Args&&... args) {
return scene->attachComponent<Component>(identifier, std::forward<Args>(args)...);
}
template<typename Component>
Component& accessComponent()
{
return scene->accessComponent<Component>(identifier);
}
template<typename Component>
const Component& accessComponent() const
{
return scene->accessComponent<Component>(identifier);
}
protected:
template <typename Component> Component& accessComponent() { return scene->accessComponent<Component>(identifier); }
template <typename Component> const Component& accessComponent() const { return scene->accessComponent<Component>(identifier); }
protected:
PScene scene;
entt::entity identifier;
};