Add initial support for skeletal entities / components

This commit is contained in:
SirLynix
2022-08-27 03:07:48 +02:00
parent 01f3f350fe
commit 50ed8b4028
55 changed files with 919 additions and 131 deletions

View File

@@ -0,0 +1,41 @@
// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_UTILITY_SYSTEMS_SKELETONSYSTEM_HPP
#define NAZARA_UTILITY_SYSTEMS_SKELETONSYSTEM_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Utility/Config.hpp>
#include <entt/entt.hpp>
namespace Nz
{
class NAZARA_UTILITY_API SkeletonSystem
{
public:
static constexpr bool AllowConcurrent = false;
static constexpr Int64 ExecutionOrder = -1'000;
SkeletonSystem(entt::registry& registry);
SkeletonSystem(const SkeletonSystem&) = delete;
SkeletonSystem(SkeletonSystem&&) = delete;
~SkeletonSystem();
void Update(float elapsedTime);
SkeletonSystem& operator=(const SkeletonSystem&) = delete;
SkeletonSystem& operator=(SkeletonSystem&&) = delete;
private:
entt::registry& m_registry;
entt::observer m_sharedSkeletonConstructObserver;
entt::observer m_skeletonConstructObserver;
};
}
#include <Nazara/Utility/Systems/SkeletonSystem.inl>
#endif // NAZARA_UTILITY_SYSTEMS_SKELETONSYSTEM_HPP

View File

@@ -0,0 +1,12 @@
// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Utility/Systems/SkeletonSystem.hpp>
#include <Nazara/Utility/Debug.hpp>
namespace Nz
{
}
#include <Nazara/Utility/DebugOff.hpp>