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 property5: Bool;
|
||||||
|
|
||||||
public var property6: String;
|
public var property6: String;
|
||||||
|
#if lnx_audio
|
||||||
var sound: kha.Sound = null;
|
var sound: kha.Sound = null;
|
||||||
var channel: kha.audio1.AudioChannel = null;
|
var channel: kha.audio1.AudioChannel = null;
|
||||||
|
#end
|
||||||
public function new(tree: LogicTree) {
|
public function new(tree: LogicTree) {
|
||||||
super(tree);
|
super(tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
override function run(from: Int) {
|
override function run(from: Int) {
|
||||||
|
#if lnx_audio
|
||||||
switch (from) {
|
switch (from) {
|
||||||
case Play:
|
case Play:
|
||||||
if (property6 == 'Sound' ? sound == null : true) {
|
if (property6 == 'Sound' ? sound == null : true) {
|
||||||
@ -63,6 +64,10 @@ class PlaySoundRawNode extends LogicNode {
|
|||||||
case UpdateVolume:
|
case UpdateVolume:
|
||||||
if (channel != null) channel.volume = inputs[4].get();
|
if (channel != null) channel.volume = inputs[4].get();
|
||||||
}
|
}
|
||||||
|
#end
|
||||||
|
#if !lnx_audio
|
||||||
|
runOutput(0);
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
function onUpdate() {
|
function onUpdate() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user