mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
SoundAsset Array
Few fixes to soundasset array to stop it complaining
This commit is contained in:
parent
3ad6d47ca9
commit
1ea693fea6
4 changed files with 80 additions and 61 deletions
|
|
@ -63,7 +63,10 @@ class LightningData : public GameBaseData
|
|||
|
||||
//-------------------------------------- Console set variables
|
||||
public:
|
||||
SFXTrack* thunderSounds[MaxThunders];
|
||||
//SFXTrack* thunderSounds[MaxThunders];
|
||||
|
||||
DECLARE_SOUNDASSET_ARRAY(LightningData, ThunderSound, MaxThunders);
|
||||
DECLARE_SOUNDASSET_ARRAY_SETGET(LightningData, ThunderSound);
|
||||
|
||||
DECLARE_SOUNDASSET(LightningData, StrikeSound);
|
||||
DECLARE_SOUNDASSET_SETGET(LightningData, StrikeSound);
|
||||
|
|
@ -91,6 +94,14 @@ class LightningData : public GameBaseData
|
|||
DECLARE_CONOBJECT(LightningData);
|
||||
static void initPersistFields();
|
||||
|
||||
SFXProfile* getThunderProfile(U32 id)
|
||||
{
|
||||
if (mThunderSoundAsset[id] != NULL)
|
||||
return mThunderSoundAsset[id]->getSfxProfile();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SFXProfile* getSFXProfile() {
|
||||
if (mStrikeSoundAsset.notNull())
|
||||
return mStrikeSoundAsset->getSfxProfile();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue