LNXSDK/leenkx/Sources/leenkx/logicnode/SetVibrateNode.hx
2025-01-22 16:18:30 +01:00

17 lines
393 B
Haxe

// Pulses the vibration hardware on the device for time in milliseconds, if such hardware exists.
package leenkx.logicnode;
import kha.System;
class SetVibrateNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function run(from: Int) {
if (inputs[1].get() > 0) System.vibrate(inputs[1].get());
runOutput(0);
}
}