starting to implement a AnimationComponent.cpp/.hpp

This commit is contained in:
Clément Le Bihan
2021-06-01 15:52:47 +02:00
parent da7d103cb9
commit e298ce03eb
3 changed files with 49 additions and 0 deletions
+2
View File
@@ -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
@@ -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)
{
}
}
@@ -0,0 +1,31 @@
//
// Created by cbihan on 01/06/2021.
//
#pragma once
#include <string>
#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;
};
}