| 1 | #include "MapObj/SaveFlagCheckObj.h" |
|---|---|
| 2 | |
| 3 | #include "Library/LiveActor/ActorInitFunction.h" |
| 4 | #include "Library/Placement/PlacementFunction.h" |
| 5 | #include "Library/Stage/StageSwitchUtil.h" |
| 6 | |
| 7 | #include "System/GameDataFunction.h" |
| 8 | |
| 9 | SaveFlagCheckObj::SaveFlagCheckObj(const char* name) : al::LiveActor(name) {} |
| 10 | |
| 11 | void SaveFlagCheckObj::init(const al::ActorInitInfo& info) { |
| 12 | al::initActorSceneInfo(actor: this, info); |
| 13 | al::initStageSwitch(this, info); |
| 14 | |
| 15 | const char* stageName = "Test"; |
| 16 | const char* objId = "Test"; |
| 17 | al::getStringArg(arg: &stageName, initInfo: info, key: "StageName"); |
| 18 | al::getStringArg(arg: &objId, initInfo: info, key: "ObjId"); |
| 19 | |
| 20 | if (GameDataFunction::isObjStarted(accessor: this, stageName, objId)) |
| 21 | al::tryOnStageSwitch(user: this, linkName: "SwitchSaveOn"); |
| 22 | |
| 23 | makeActorDead(); |
| 24 | } |
| 25 |