mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-31 01:25:21 +00:00
starting to implement a AnimationComponent.cpp/.hpp
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user