mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-31 01:25:21 +00:00
Finishing to rework the drawable system
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Models/TypeHolder.hpp>
|
||||
#include "Component/Component.hpp"
|
||||
#include "Drawables/ADrawable3D.hpp"
|
||||
#include "Model/Model.hpp"
|
||||
@@ -24,9 +25,9 @@ namespace BBM
|
||||
|
||||
//! ctor
|
||||
template<typename T, typename ...Params>
|
||||
explicit Drawable2DComponent(WAL::Entity &entity, Params &&...params)
|
||||
explicit Drawable2DComponent(WAL::Entity &entity, WAL::TypeHolder<T>, Params &&...params)
|
||||
: WAL::Component(entity),
|
||||
drawable(std::move(T(std::forward<Params>(params)...)))
|
||||
drawable(new T(std::forward<Params>(params)...))
|
||||
{}
|
||||
|
||||
//! @brief Clone a component for another or the same entity.
|
||||
|
||||
Reference in New Issue
Block a user