package leenkx.logicnode; #if lnx_audio import iron.object.SpeakerObject; #end class SetVolumeSoundNode 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) return; object.setVolume(inputs[2].get()); #end runOutput(0); } }