forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
16
leenkx/Sources/leenkx/logicnode/ArrayInArrayNode.hx
Normal file
16
leenkx/Sources/leenkx/logicnode/ArrayInArrayNode.hx
Normal file
@ -0,0 +1,16 @@
|
||||
package leenkx.logicnode;
|
||||
|
||||
class ArrayInArrayNode extends LogicNode {
|
||||
|
||||
public function new(tree: LogicTree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
override function get(from: Int): Dynamic {
|
||||
var array: Array<Dynamic> = inputs[0].get();
|
||||
array = array.map(item -> Std.string(item));
|
||||
var value: Dynamic = inputs[1].get();
|
||||
|
||||
return array.indexOf(Std.string(value)) != -1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user