OROCHI
 
Loading...
Searching...
No Matches
GxUnitEffectEffekseer.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12#if PLATFORM_EFFEKSEER_SUPPORT
13
14GX_EFFECT_NAMESPACE_BEGIN()
15class GxResEffectEffekseer;
16//===========================================================================
18//===========================================================================
19class GxUnitEffectEffekseer : public GxUnitEffectBase
20{
21 //-----------------------------------------------------------
23 //-----------------------------------------------------------
25public:
27 enum class LAYER
28 {
29 NORMAL,
30 AFTER_FILTER,
31 MAX,
32 };
33#if GX_DEVELOP
35 GX_ENUM_TABLE_MAX(LAYER)
36#endif //GX_DEVELOP
37
38 // RTTI宣言
39 GX_RTTI_CLASS_NAME(GxUnitEffectEffekseer, GxUnitEffectBase, "EFFEKSEER基礎")
40 // GxClassBaseReference継承クラス用禁止宣言
41 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxUnitEffectEffekseer);
42
44 //-----------------------------------------------------------
46 //-----------------------------------------------------------
48
50 GxUnitEffectEffekseer(void);
52 void cleanup(void) override;
53
54private:
56 void createEffect(void);
57
59 //-----------------------------------------------------------
61 //-----------------------------------------------------------
63protected:
65 b32 setup(void) override;
67 void asyncUpdate(void) override;
69 void sequentialUpdate(void) override;
71 void forceAsyncUpdate(void) override;
72
74 void play(u32 upwardFrame = 0) override;
76 GX_FORCE_INLINE void stop(void) override { _playFlag = false; }
77
79 //-----------------------------------------------------------
81 //-----------------------------------------------------------
83public:
85 GX_FORCE_INLINE void setFilename(const GxString& name) override { _filename = name; }
87 constexpr f32 getSpeed(void) const { return _speed; }
89 constexpr void setSpeed(f32 speed) { _speed = speed; }
91 GX_FORCE_INLINE GxColorHDR getColor(void) const { return _color; }
93 GX_FORCE_INLINE void setColor(GxColorHDR color) { _color = color; }
95 GX_FORCE_INLINE void setLoop(b32 on) override { _loopFlag = on; }
96#if GX_DEVELOP
98 void setResource(GxResBase* pResource) override;
99#endif //GX_DEVELOP
100private:
102 void getPropertyResourceEffect(void* const pValue);
104 void setPropertyResourceEffect(const void* const pValue);
105
107 //-----------------------------------------------------------
109 //-----------------------------------------------------------
111private:
112 GxString _filename;
113 GxColorHDR _color;
114 GxResEffectEffekseer* _pResEffect;
115 b32 _loopFlag;
116 b32 _playFlag;
117 f32 _speed;
118 LAYER _layer;
119 Effekseer::Handle _handle;
120 Effekseer::EffectRef _effect;
121
123};
124
125GX_EFFECT_NAMESPACE_END()
126
127#endif //PLATFORM_EFFEKSEER_SUPPORT
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
@ MAX
定義数
@ NORMAL
法線(VS入力,VS→PS)
リソース基底クラス
Definition GxResBase.h:23
エフェクトユニット基礎クラス
Definition GxUnitEffectBase.h:18
色(HDR)
Definition GxColor.h:241
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173