Files
LNXSDK/leenkx/Sources/leenkx/logicnode/SetSoundNode.hx

19 lines
399 B
Haxe
Raw Normal View History

2025-01-22 16:18:30 +01:00
package leenkx.logicnode;
import iron.object.SpeakerObject;
class SetSoundNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function run(from: Int) {
var object: SpeakerObject = cast(inputs[1].get(), SpeakerObject);
var sound: String = inputs[2].get();
if (object == null || sound == null) return;
object.setSound(sound);
runOutput(0);
}
}