forked from LeenkxTeam/LNXSDK
Update leenkx/Sources/leenkx/logicnode/PlaySoundRawNode.hx
This commit is contained in:
parent
6be977da7e
commit
9e47c1db6d
@ -16,15 +16,16 @@ class PlaySoundRawNode extends LogicNode {
|
||||
public var property5: Bool;
|
||||
|
||||
public var property6: String;
|
||||
|
||||
#if lnx_audio
|
||||
var sound: kha.Sound = null;
|
||||
var channel: kha.audio1.AudioChannel = null;
|
||||
|
||||
#end
|
||||
public function new(tree: LogicTree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
override function run(from: Int) {
|
||||
#if lnx_audio
|
||||
switch (from) {
|
||||
case Play:
|
||||
if (property6 == 'Sound' ? sound == null : true) {
|
||||
@ -63,6 +64,10 @@ class PlaySoundRawNode extends LogicNode {
|
||||
case UpdateVolume:
|
||||
if (channel != null) channel.volume = inputs[4].get();
|
||||
}
|
||||
#end
|
||||
#if !lnx_audio
|
||||
runOutput(0);
|
||||
#end
|
||||
}
|
||||
|
||||
function onUpdate() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user