forked from Onek8/LNXSDK
25 lines
507 B
Haxe
25 lines
507 B
Haxe
package leenkx.logicnode;
|
|
|
|
#if lnx_audio
|
|
import iron.object.SpeakerObject;
|
|
import kha.audio1.AudioChannel;
|
|
import iron.system.Audio;
|
|
#end
|
|
|
|
class SetPositionSpeakerNode extends LogicNode {
|
|
|
|
public function new(tree: LogicTree) {
|
|
super(tree);
|
|
}
|
|
|
|
override function run(from: Int) {
|
|
#if lnx_audio
|
|
var object: SpeakerObject = cast(inputs[1].get(), SpeakerObject);
|
|
if (object == null || object.sound == null){ runOutput(0); return; }
|
|
|
|
object.setPosition(inputs[2].get());
|
|
#end
|
|
runOutput(0);
|
|
}
|
|
}
|