Add initial support for skeletal entities / components
This commit is contained in:
41
include/Nazara/Utility/Systems/SkeletonSystem.hpp
Normal file
41
include/Nazara/Utility/Systems/SkeletonSystem.hpp
Normal 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
|
||||
12
include/Nazara/Utility/Systems/SkeletonSystem.inl
Normal file
12
include/Nazara/Utility/Systems/SkeletonSystem.inl
Normal 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>
|
||||
Reference in New Issue
Block a user