Update leenkx/Sources/leenkx/logicnode/PlaySoundNode.hx

This commit is contained in:
Onek8 2025-04-03 12:30:45 +00:00
parent 693fa36ee1
commit 6be977da7e

View File

@ -1,7 +1,7 @@
package leenkx.logicnode;
#if lnx_audio
import iron.object.SpeakerObject;
#end
class PlaySoundNode extends LogicNode {
public function new(tree: LogicTree) {
@ -9,9 +9,11 @@ class PlaySoundNode extends LogicNode {
}
override function run(from: Int) {
#if lnx_audio
var object: SpeakerObject = cast(inputs[1].get(), SpeakerObject);
if (object == null) return;
object.play();
#end
runOutput(0);
}
}