OROCHI
 
Loading...
Searching...
No Matches
GxUnitRTDCharacter.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12GX_UTILITY_NAMESPACE_BEGIN()
14//===========================================================================
16//===========================================================================
18{
19 //-----------------------------------------------------------
21 //-----------------------------------------------------------
23public:
24 GX_RTTI_CLASS_NAME(GxUnitRTDCharacter, GxUnitModel, "RTD用キャラクター")
25 // ClassBaseReference継承クラス用禁止宣言
27
28
29 typedef void (GxClassBaseRoot::* EFFECT_REQUEST_CALLBACK)(GxUnitRTDCharacter* pThis);
31 typedef void (GxClassBaseRoot::* SE_REQUEST_CALLBACK)(GxUnitRTDCharacter* pThis);
32
34 //-----------------------------------------------------------
36 //-----------------------------------------------------------
38public:
42 void cleanup(void) override;
44 void deleteRTDAllEffect(void);
45
47 virtual void pauseEffect(void);
49 virtual void resumeEffect(void);
50
52 //-----------------------------------------------------------
54 //-----------------------------------------------------------
56protected:
58 void asyncUpdate(void) override;
60 void forceAsyncUpdate(void) override;
61
62private:
64 constexpr GxResMotionPackage* getResourceMotionPackage(void) const { return _pResMotionPackage; }
66 GX_FORCE_INLINE void setResourceMotionPackage(GxResMotionPackage* pResource){ GX_SET_CLASS_BASE_REFERENCE(_pResMotionPackage, pResource); }
68 void getPropertyResourceMotionPackage(void* const pValue);
70 void setPropertyResourceMotionPackage(const void* const pValue);
72 virtual b32 createMotion(GxResMotionPackage* pResource);
74 GX_FORCE_INLINE virtual GxMotionPlayer* getMotion(void) const { return _pMotion; }
76 GX_FORCE_INLINE virtual GxMotionPlayer* allocateMotion(void){ return GX_NEW GxMotionPlayer; }
78 virtual void updateMotion(void);
80 virtual void startMotion(void);
81public:
83 void pauseMotion(void);
85 void resumeMotion(void);
86
87public:
89 GX_FORCE_INLINE void addBottomToEffectList(GxUnitEffectBaseRoot* pEffectBase) { _effectList.addBottom(pEffectBase); }
90private:
92 void startEffect(void);
93protected:
95 GX_FORCE_INLINE virtual GxUnitEffectBase* createUnitEffect(void) { GX_ASSERT(false, "GxUnitRTDCharacter::createUnitEffectをオーバーライドしてください"); return nullptr; }
96
97public:
98#if GX_DEVELOP
100 void setRequestSkipNotification(GxUnitRealTimeDemo* pUnitRTD, u32 request);
102 b32 searchSkipEffect(u32 skipStartFrame, u32 skipEndFrame, GxArray* pSkipEffectList, GxArray* pEffectStartFrameList);
103#endif // GX_DEVELOP
104
105#if USE_GXSOUND
107 GX_FORCE_INLINE void addBottomToSeList(GxUnitSoundSe3dBase* pSeBase) { _seList.addBottom(pSeBase); }
108#endif //USE_GXSOUND
109private:
111 virtual void startSE(void);
112
114 //-----------------------------------------------------------
116 //-----------------------------------------------------------
118public:
120 GX_FORCE_INLINE GxString getEffectDirectoryPath(void) const { return _effectDirectoryPath; }
122 GX_FORCE_INLINE GxString getEffectFileName(void) const { return _effectFileName; }
124 GX_FORCE_INLINE b32 getEffectLoopFlag(void) const { return _effectLoopFlag; }
126 constexpr s32 getEffectJointNumber(void) const { return _effectJointNumber; }
128 GX_FORCE_INLINE GxVector3 getEffectOffset(void) const { return _effectOffset; }
130 GX_FORCE_INLINE GxQuaternion getEffectQuaternion(void) const { return _effectQuaternion;}
131
133 GX_FORCE_INLINE GxString getSoundFileName(void) const { return _soundFileName; }
135 GX_FORCE_INLINE GxString getSoundCategoryName(void) const { return _soundCategoryName; }
137 GX_FORCE_INLINE GxString getSoundSeName(void) const { return _soundSeName; }
139 constexpr s32 getSoundAttribute(void) const { return _soundAttribute; }
141 GX_FORCE_INLINE b32 getSoundLoopFlag(void) const { return _soundLoopFlag;}
143 constexpr s32 getSoundJointNumber(void) const { return _soundJointNumber; }
145 GX_FORCE_INLINE GxVector3 getSoundOffset(void) const { return _soundOffset; }
146
148 //-------------------------------------------------------------
150 //-------------------------------------------------------------
152private:
153 s32 _motionMotionNumber;
154 f32 _motionStartFrame;
155 f32 _motionSpeedRatio;
156 u32 _motionPlaybackFlags;
157 f32 _motionInterpolateFrameNumber;
158 INTERPOLATE _motionInterpolateType;
159 f32 _motionInterpolateCurvature;
160 GxString _effectDirectoryPath;
161 GxString _effectFileName;
162 b32 _effectLoopFlag;
163 s32 _effectJointNumber;
164 GxVector3 _effectOffset;
165 GxQuaternion _effectQuaternion;
166 GxString _soundFileName;
167 GxString _soundCategoryName;
168 GxString _soundSeName;
169 s32 _soundAttribute;
170 b32 _soundLoopFlag;
171 s32 _soundJointNumber;
172 GxVector3 _soundOffset;
173 GxMotionPlayer* _pMotion;
174 GxResMotionPackage* _pResMotionPackage;
175 GxArray _seList;
176protected:
178#if GX_DEVELOP
179 GxUnitRealTimeDemo* _pUnitRealTimeDemo;
180 u32 _skipRequest;
181#endif //GX_DEVELOP
182
184};
185
186GX_UTILITY_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
#define GX_SET_CLASS_BASE_REFERENCE(__DST__, __SRC__)
オブジェクト設定(参照カウンタを使用する場合)
Definition GxBase.h:318
INTERPOLATE
補間タイプ
Definition GxMotionDefine.h:17
配列クラス
Definition GxArray.h:18
基底クラス
Definition GxBase.h:51
モーション再生クラス
Definition GxMotionPlayer.h:22
モーションパッケージリソース
Definition GxResMotionPackage.h:20
エフェクトユニット基礎クラス
Definition GxUnitEffectBase.h:18
エフェクト基礎ユニットクラス
Definition GxUnitEffectBaseRoot.h:18
モデルクラス
Definition GxUnitModel.h:19
RTD用キャラクター
Definition GxUnitRTDCharacter.h:18
GxArray _effectList
自身が作成したエフェクトユニットリスト
Definition GxUnitRTDCharacter.h:177
GX_FORCE_INLINE GxString getSoundFileName(void) const
使用するサウンドファイル名を取得
Definition GxUnitRTDCharacter.h:133
constexpr s32 getSoundJointNumber(void) const
アタッチするジョイントナンバーを取得
Definition GxUnitRTDCharacter.h:143
GX_FORCE_INLINE GxQuaternion getEffectQuaternion(void) const
アタッチしたジョイントからのオフセット姿勢を取得
Definition GxUnitRTDCharacter.h:130
GX_FORCE_INLINE GxString getSoundCategoryName(void) const
サウンドカテゴリ名を取得
Definition GxUnitRTDCharacter.h:135
GX_FORCE_INLINE GxString getEffectDirectoryPath(void) const
使用するエフェクトフォルダへのパスを取得
Definition GxUnitRTDCharacter.h:120
GX_FORCE_INLINE b32 getSoundLoopFlag(void) const
サウンドをループするかどうかを取得
Definition GxUnitRTDCharacter.h:141
virtual GX_FORCE_INLINE GxUnitEffectBase * createUnitEffect(void)
エフェクトユニットを生成
Definition GxUnitRTDCharacter.h:95
GX_FORCE_INLINE GxString getSoundSeName(void) const
SE名を取得
Definition GxUnitRTDCharacter.h:137
constexpr s32 getEffectJointNumber(void) const
アタッチするジョイントナンバーを取得
Definition GxUnitRTDCharacter.h:126
GX_FORCE_INLINE GxVector3 getSoundOffset(void) const
アタッチしたジョイントからのオフセット座標を取得
Definition GxUnitRTDCharacter.h:145
GX_FORCE_INLINE void addBottomToEffectList(GxUnitEffectBaseRoot *pEffectBase)
エフェクトリストにユニットを追加
Definition GxUnitRTDCharacter.h:89
GX_FORCE_INLINE GxString getEffectFileName(void) const
使用するエフェクトファイル名を取得
Definition GxUnitRTDCharacter.h:122
constexpr s32 getSoundAttribute(void) const
サウンド再生属性を取得
Definition GxUnitRTDCharacter.h:139
GX_FORCE_INLINE GxVector3 getEffectOffset(void) const
アタッチしたジョイントからのオフセット座標を取得
Definition GxUnitRTDCharacter.h:128
GX_FORCE_INLINE b32 getEffectLoopFlag(void) const
エフェクトをループするかどうかを取得
Definition GxUnitRTDCharacter.h:124
リアルタイムデモ管理ユニット
Definition GxUnitRealTimeDemo.h:19
クォータニオン
Definition GxQuaternion.h:19
文字列型クラス
Definition GxString.h:18
3次元ベクトル
Definition GxVector.h:245
32bitブーリアン
Definition GxDefine.h:173