Update leenkx/Sources/leenkx/logicnode/PlaySoundNode.hx
This commit is contained in:
parent
693fa36ee1
commit
6be977da7e
@ -1,7 +1,7 @@
|
|||||||
package leenkx.logicnode;
|
package leenkx.logicnode;
|
||||||
|
#if lnx_audio
|
||||||
import iron.object.SpeakerObject;
|
import iron.object.SpeakerObject;
|
||||||
|
#end
|
||||||
class PlaySoundNode extends LogicNode {
|
class PlaySoundNode extends LogicNode {
|
||||||
|
|
||||||
public function new(tree: LogicTree) {
|
public function new(tree: LogicTree) {
|
||||||
@ -9,9 +9,11 @@ class PlaySoundNode 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.play();
|
object.play();
|
||||||
|
#end
|
||||||
runOutput(0);
|
runOutput(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user