mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
SoundAssetImplements
-Explosion -Lightning -Splash -Other sound asset implementations will require soundasset array if possible.
This commit is contained in:
parent
bda5266c88
commit
c92cfe3e81
6 changed files with 87 additions and 35 deletions
|
|
@ -41,7 +41,8 @@
|
|||
|
||||
#include "gfx/gfxTextureHandle.h"
|
||||
|
||||
|
||||
#include "T3D/assets/ImageAsset.h"
|
||||
#include "T3D/assets/SoundAsset.h"
|
||||
|
||||
class ShapeBase;
|
||||
class LightningStrikeEvent;
|
||||
|
|
@ -63,7 +64,10 @@ class LightningData : public GameBaseData
|
|||
//-------------------------------------- Console set variables
|
||||
public:
|
||||
SFXTrack* thunderSounds[MaxThunders];
|
||||
SFXTrack* strikeSound;
|
||||
|
||||
DECLARE_SOUNDASSET(LightningData, StrikeSound);
|
||||
DECLARE_SOUNDASSET_SETGET(LightningData, StrikeSound);
|
||||
|
||||
StringTableEntry strikeTextureNames[MaxTextures];
|
||||
|
||||
//-------------------------------------- load set variables
|
||||
|
|
@ -86,6 +90,14 @@ class LightningData : public GameBaseData
|
|||
|
||||
DECLARE_CONOBJECT(LightningData);
|
||||
static void initPersistFields();
|
||||
|
||||
SFXProfile* getSFXProfile() {
|
||||
if (mStrikeSoundAsset.notNull())
|
||||
return mStrikeSoundAsset->getSfxProfile();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue