mirror of
https://github.com/encounter/Petari.git
synced 2026-03-30 11:34:15 -07:00
26 lines
763 B
C++
26 lines
763 B
C++
#include "Game/MapObj/PurpleCoinStarter.hpp"
|
|
#include "Game/Util.hpp"
|
|
|
|
PurpleCoinStarter::PurpleCoinStarter(const char *pName) : NameObj(pName) {
|
|
mCoinHolder = nullptr;
|
|
mSwitchCtrl = nullptr;
|
|
}
|
|
|
|
void PurpleCoinStarter::init(const JMapInfoIter &rIter) {
|
|
mSwitchCtrl = MR::createStageSwitchCtrl(this, rIter);
|
|
MR::listenNameObjStageSwitchOnAppear(this, mSwitchCtrl, MR::FunctorV0M<PurpleCoinStarter *, void (PurpleCoinStarter::*)(void)>(this, &PurpleCoinStarter::start));
|
|
MR::createPurpleCoinHolder();
|
|
MR::registPurpleCoinStarter(this);
|
|
}
|
|
|
|
void PurpleCoinStarter::setHost(PurpleCoinHolder *pHolder) {
|
|
mCoinHolder = pHolder;
|
|
}
|
|
|
|
void PurpleCoinStarter::start() {
|
|
mCoinHolder->start();
|
|
}
|
|
|
|
PurpleCoinStarter::~PurpleCoinStarter() {
|
|
|
|
} |