Update leenkx/Sources/leenkx/logicnode/PauseSoundNode.hx

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

View File

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