| 1 | #include "MapObj/TransparentWall.h" |
| 2 | |
| 3 | #include "Library/Base/StringUtil.h" |
| 4 | #include "Library/LiveActor/ActorClippingFunction.h" |
| 5 | #include "Library/LiveActor/ActorCollisionFunction.h" |
| 6 | #include "Library/LiveActor/ActorInitUtil.h" |
| 7 | #include "Library/LiveActor/ActorPoseUtil.h" |
| 8 | #include "Library/LiveActor/ActorSensorUtil.h" |
| 9 | #include "Library/Placement/PlacementFunction.h" |
| 10 | |
| 11 | #include "Util/ActorDimensionKeeper.h" |
| 12 | |
| 13 | TransparentWall::TransparentWall(const char* name) : al::LiveActor(name) {} |
| 14 | |
| 15 | void TransparentWall::init(const al::ActorInitInfo& info) { |
| 16 | const char* objectName; |
| 17 | al::getObjectName(name: &objectName, initInfo: info); |
| 18 | |
| 19 | if (al::isEqualString(str1: "TransparentWall2D" , str2: objectName)) { |
| 20 | al::initActorWithArchiveName(actor: this, initInfo: info, archiveName: "TransparentWall" , suffix: nullptr); |
| 21 | al::setCollisionPartsSpecialPurposeName(this, rs::getSpecialPurposeName2DOnly()); |
| 22 | } else { |
| 23 | al::initActor(actor: this, initInfo: info); |
| 24 | } |
| 25 | |
| 26 | al::setClippingInfo(actor: this, al::getScaleX(actor: this) * 500.0f * sqrtf(2.0f), nullptr); |
| 27 | |
| 28 | al::trySyncStageSwitchAppearAndKill(actor: this); |
| 29 | } |
| 30 | |
| 31 | bool TransparentWall::receiveMsg(const al::SensorMsg* message, al::HitSensor* other, |
| 32 | al::HitSensor* self) { |
| 33 | return al::isMsgScreenPointInvalidCollisionParts(msg: message); |
| 34 | } |
| 35 | |