Update leenkx/Sources/leenkx/logicnode/StopSoundNode.hx
This commit is contained in:
parent
21c2abe67c
commit
32c6535f8a
@ -1,7 +1,7 @@
|
|||||||
package leenkx.logicnode;
|
package leenkx.logicnode;
|
||||||
|
#if lnx_audio
|
||||||
import iron.object.SpeakerObject;
|
import iron.object.SpeakerObject;
|
||||||
|
#end
|
||||||
class StopSoundNode extends LogicNode {
|
class StopSoundNode extends LogicNode {
|
||||||
|
|
||||||
public function new(tree: LogicTree) {
|
public function new(tree: LogicTree) {
|
||||||
@ -9,9 +9,11 @@ class StopSoundNode extends LogicNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override function run(from: Int) {
|
override function run(from: Int) {
|
||||||
|
#if lnx_audio
|
||||||
var object: SpeakerObject = cast(inputs[1].get(), SpeakerObject);
|
var object: SpeakerObject = cast(inputs[1].get(), SpeakerObject);
|
||||||
if (object == null) return;
|
if (object == null) return;
|
||||||
object.stop();
|
object.stop();
|
||||||
|
#end
|
||||||
runOutput(0);
|
runOutput(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user