Files
Bomberman/sources/Component/Timer/TimerComponent.cpp
2021-06-17 20:50:43 +02:00

26 lines
607 B
C++

//
// Created by Zoe Roux on 5/31/21.
//
#include "TimerComponent.hpp"
#include <utility>
namespace BBM
{
TimerComponent::TimerComponent(WAL::Entity &entity, std::chrono::nanoseconds delay)
: WAL::Component(entity),
ringIn(delay)
{}
TimerComponent::TimerComponent(WAL::Entity &entity, std::chrono::nanoseconds delay, const WAL::Callback<WAL::Entity &, WAL::Wal &> &timerCallback)
: WAL::Component(entity),
callback(timerCallback),
ringIn(delay)
{}
WAL::Component *TimerComponent::clone(WAL::Entity &entity) const
{
return new TimerComponent(entity, this->ringIn, this->callback);
}
}