Initial hook-in of the sound asset's integration into sfxEmitter, as well as some fixups for editor/workflow usage.

This commit is contained in:
JeffR 2021-08-31 00:54:05 -05:00
parent 6fc67a11bb
commit 56b0a0cb85
6 changed files with 214 additions and 138 deletions

View file

@ -38,7 +38,7 @@ function AssetBrowser::onSoundAssetEditorDropped(%this, %assetDef, %position)
%newSFXEmitter = new SFXEmitter()
{
position = %pos;
fileName = %assetDef.getSoundPath();
soundAsset = %assetDef.getAssetId();
pitch = %assetDef.pitchAdjust;
volume = %assetDef.volumeAdjust;
};
@ -50,4 +50,9 @@ function AssetBrowser::onSoundAssetEditorDropped(%this, %assetDef, %position)
EWorldEditor.isDirty = true;
}
function AssetBrowser::editSoundAsset(%this, %assetDef)
{
%soundSource = %assetDef.playSound();
}