diff --git a/CMakeLists.txt b/CMakeLists.txt index 763064ac..81b3c154 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,8 @@ set(SOURCES sources/Component/Renderer/CameraComponent.hpp sources/System/Renderer/Render2DScreenSystem.cpp sources/System/Renderer/Render2DScreenSystem.hpp + sources/Component/Animation/AnimationComponent.cpp + sources/Component/Animation/AnimationComponent.hpp ) add_executable(bomberman diff --git a/sources/Component/Animation/AnimationComponent.cpp b/sources/Component/Animation/AnimationComponent.cpp new file mode 100644 index 00000000..d1f8210b --- /dev/null +++ b/sources/Component/Animation/AnimationComponent.cpp @@ -0,0 +1,16 @@ +// +// Created by cbihan on 01/06/2021. +// + +#include "AnimationComponent.hpp" +#include "Entity/Entity.hpp" + +namespace BBM +{ + AnimationComponent::AnimationComponent(WAL::Entity &entity, RAY::ModelAnimation &modelAnimation) + : WAL::Component(entity), + _modelAnimation(modelAnimation) + { + + } +} \ No newline at end of file diff --git a/sources/Component/Animation/AnimationComponent.hpp b/sources/Component/Animation/AnimationComponent.hpp new file mode 100644 index 00000000..36946c16 --- /dev/null +++ b/sources/Component/Animation/AnimationComponent.hpp @@ -0,0 +1,31 @@ +// +// Created by cbihan on 01/06/2021. +// + +#pragma once + +#include +#include "Component/Component.hpp" +#include "Entity/Entity.hpp" +#include "Model/Model.hpp" + +namespace BBM +{ + + class AnimationComponent : public WAL::Component + { + private: + //! @brief To get the animation data + RAY::ModelAnimation &_modelAnimation; + public: + //! @brief ctor entity and the path of the animation file + explicit AnimationComponent(WAL::Entity &entity, RAY::ModelAnimation &modelAnimation); + //! @brief copy ctor + AnimationComponent(const AnimationComponent &) = default; + //! @brief dtor + ~AnimationComponent() override = default; + //! @brief assignment operator + AnimationComponent &operator=(const AnimationComponent &) = delete; + }; + +}