1#pragma once
2
3#include "Library/LiveActor/LiveActor.h"
4
5namespace al {
6class MtxConnector;
7
8class VisibleSwitchMapParts : public LiveActor {
9public:
10 enum class ConnectMapDirType : s32 {
11 Invalid = -1,
12 Side = 0,
13 NegSide = 1,
14 Up = 2,
15 NegUp = 3,
16 Front = 4,
17 NegFront = 5
18 };
19
20 VisibleSwitchMapParts(const char* name);
21
22 void init(const ActorInitInfo& info) override;
23 /**
24 * @warning This function produce Undefined Behavior when mConnectMapDirType is equal to
25 * ConnectMapDirType::Invalid, ConnectMapDirType::NegSide, ConnectMapDirType::NegUp or
26 * ConnectMapDirType::NegFront
27 */
28 void initAfterPlacement() override;
29 void control() override;
30 bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override;
31
32 void startDisappear();
33 void startAppear();
34 void startSuddenDisappear();
35
36 void exeShow();
37 void exeDisappear();
38 void exeDisappearDither();
39 void exeHide();
40 void exeAppear();
41 void exeAppearDither();
42
43private:
44 ConnectMapDirType mConnectMapDirType = ConnectMapDirType::Invalid;
45 MtxConnector* mMtxConnector = nullptr;
46 f32 mConnectMapCheckLength = 150.0f;
47 bool mIsUsingAlphaMask = true;
48 s32 mDitherFrame = 30;
49};
50
51static_assert(sizeof(VisibleSwitchMapParts) == 0x128);
52} // namespace al
53