| 1 | #include "Item/CoinBlow.h" |
| 2 | |
| 3 | #include "Library/Base/StringUtil.h" |
| 4 | #include "Library/Item/ItemUtil.h" |
| 5 | #include "Library/LiveActor/ActorInitFunction.h" |
| 6 | #include "Library/LiveActor/ActorInitUtil.h" |
| 7 | #include "Library/Placement/PlacementFunction.h" |
| 8 | #include "Library/Stage/StageSwitchUtil.h" |
| 9 | #include "Library/Thread/FunctorV0M.h" |
| 10 | |
| 11 | CoinBlow::CoinBlow(const char* name) : al::LiveActor(name) {} |
| 12 | |
| 13 | void CoinBlow::init(const al::ActorInitInfo& initInfo) { |
| 14 | using CoinBlowFunctor = al::FunctorV0M<CoinBlow*, void (CoinBlow::*)()>; |
| 15 | |
| 16 | al::initActorWithArchiveName(actor: this, initInfo, archiveName: "CoinBlow" , suffix: nullptr); |
| 17 | al::listenStageSwitchOnStart(user: this, action: CoinBlowFunctor(this, &CoinBlow::listenStart)); |
| 18 | al::tryGetStringArg(arg: &mBlowSize, initInfo, key: "BlowSize" ); |
| 19 | makeActorDead(); |
| 20 | } |
| 21 | |
| 22 | void CoinBlow::listenStart() { |
| 23 | if (mBlowSize == nullptr) { |
| 24 | al::appearItemTiming(actor: this, "小" ); |
| 25 | return; |
| 26 | } |
| 27 | if (al::isEqualString(str1: mBlowSize, str2: "VerySmall" )) { |
| 28 | al::appearItemTiming(actor: this, "極小" ); |
| 29 | return; |
| 30 | } |
| 31 | if (al::isEqualString(str1: mBlowSize, str2: "Little" )) { |
| 32 | al::appearItemTiming(actor: this, "小" ); |
| 33 | return; |
| 34 | } |
| 35 | if (al::isEqualString(str1: mBlowSize, str2: "Middle" )) { |
| 36 | al::appearItemTiming(actor: this, "中" ); |
| 37 | return; |
| 38 | } |
| 39 | if (al::isEqualString(str1: mBlowSize, str2: "Large" )) { |
| 40 | al::appearItemTiming(actor: this, "大" ); |
| 41 | return; |
| 42 | } |
| 43 | if (al::isEqualString(str1: mBlowSize, str2: "BlowUp" )) { |
| 44 | al::appearItemTiming(actor: this, "吹き出し" ); |
| 45 | return; |
| 46 | } |
| 47 | if (al::isEqualString(str1: mBlowSize, str2: "BlowUpLittle" )) { |
| 48 | al::appearItemTiming(actor: this, "吹き出し[小]" ); |
| 49 | return; |
| 50 | } |
| 51 | } |
| 52 | |