Magic_Game/core/actions/Callback.cpp

27 lines
359 B
C++
Raw Normal View History

2018-09-04 22:42:34 +08:00
#include "..\e2daction.h"
e2d::Callback::Callback(const Function& func) :
callback_(func)
{
}
e2d::Callback * e2d::Callback::Clone() const
{
2018-09-07 00:28:54 +08:00
return new Callback(callback_);
2018-09-04 22:42:34 +08:00
}
e2d::Callback * e2d::Callback::Reverse() const
{
2018-09-07 00:28:54 +08:00
return new Callback(callback_);
2018-09-04 22:42:34 +08:00
}
void e2d::Callback::Init()
{
}
void e2d::Callback::Update()
{
callback_();
this->Stop();
}