adding lonely option for shaders and adding a BombExplosionShaderComponent.cpp to save data

This commit is contained in:
Clément Le Bihan
2021-06-16 10:30:10 +02:00
parent 17bfbfe9f9
commit e9e389374b
10 changed files with 248 additions and 160 deletions
@@ -0,0 +1,44 @@
//
// Created by cbihan on 16/06/2021.
//
#pragma once
#include "Component/Component.hpp"
#include "Entity/Entity.hpp"
#include <chrono>
using namespace std::chrono_literals;
namespace BBM
{
class BombExplosionShaderComponent : public WAL::Component
{
public:
//! @brief Explosion radius
float explosionRadius = 4;
//! @brief to have the shader move by the time
float frameCounter = 0;
//! @brief The clock to use
std::chrono::nanoseconds clock = 0ns;
//! @inherit
WAL::Component *clone(WAL::Entity &entity) const override;
//! @brief ctor
explicit BombExplosionShaderComponent(WAL::Entity &entity);
//! @brief Default copy ctor
BombExplosionShaderComponent(const BombExplosionShaderComponent &) = default;
//! @brief Default dtor
~BombExplosionShaderComponent() override = default;
//! @brief Default assignment operator
BombExplosionShaderComponent &operator=(const BombExplosionShaderComponent &) = delete;
};
}