mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-09 20:25:31 +00:00
adding white effect on bombs
This commit is contained in:
@@ -32,7 +32,6 @@ namespace BBM
|
||||
//! @inherit
|
||||
WAL::Component *clone(WAL::Entity &entity) const override;
|
||||
|
||||
|
||||
//! @brief ctor
|
||||
explicit BombExplosionShaderComponent(WAL::Entity &entity);
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Created by cbihan on 16/06/2021.
|
||||
//
|
||||
|
||||
#include "WhiteShaderComponent.hpp"
|
||||
|
||||
namespace BBM
|
||||
{
|
||||
WhiteShaderComponent::WhiteShaderComponent(WAL::Entity &entity) :
|
||||
Component(entity)
|
||||
{
|
||||
}
|
||||
|
||||
WAL::Component *WhiteShaderComponent::clone(WAL::Entity &entity) const
|
||||
{
|
||||
return new WhiteShaderComponent(this->_entity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// Created by cbihan on 16/06/2021.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "Component/Component.hpp"
|
||||
#include <chrono>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
namespace BBM
|
||||
{
|
||||
class WhiteShaderComponent : public WAL::Component
|
||||
{
|
||||
public:
|
||||
//! @brief Transparency
|
||||
float whiteValue = 0;
|
||||
|
||||
//! @brief used to increase & decrease white value
|
||||
float balance = 1;
|
||||
|
||||
//! @brief The clock to use
|
||||
std::chrono::nanoseconds clock = 0ns;
|
||||
|
||||
|
||||
//! @inherit
|
||||
WAL::Component *clone(WAL::Entity &entity) const override;
|
||||
|
||||
//! @brief ctor
|
||||
explicit WhiteShaderComponent(WAL::Entity &entity);
|
||||
|
||||
//! @brief Default copy ctor
|
||||
WhiteShaderComponent(const WhiteShaderComponent &) = default;
|
||||
|
||||
//! @brief Default dtor
|
||||
~WhiteShaderComponent() override = default;
|
||||
|
||||
//! @brief Default assignment operator
|
||||
WhiteShaderComponent &operator=(const WhiteShaderComponent &) = delete;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user