mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-02-22 21:24:59 +00:00
26 lines
607 B
C++
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);
|
|
}
|
|
} |