forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
18
leenkx/Sources/leenkx/logicnode/WaitForNode.hx
Normal file
18
leenkx/Sources/leenkx/logicnode/WaitForNode.hx
Normal file
@ -0,0 +1,18 @@
|
||||
package leenkx.logicnode;
|
||||
|
||||
class WaitForNode extends LogicNode {
|
||||
|
||||
var froms: Array<Int> = [];
|
||||
|
||||
public function new(tree: LogicTree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
override function run(from: Int) {
|
||||
|
||||
if(!froms.contains(from)) froms.push(from);
|
||||
if(inputs.length == froms.length){ runOutput(0); froms = []; }
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user