armory/Sources/armory/logicnode/GetObjectOffscreenNode.hx

25 lines
427 B
Haxe
Raw Normal View History

2020-09-13 19:08:55 +02:00
package armory.logicnode;
import iron.object.Object;
class GetObjectOffscreenNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function get(from: Int): Dynamic {
var object: Object = inputs[0].get();
if (object == null) return null;
return switch (from) {
case 0: object.culled;
case 1: object.culledMesh;
case 2: object.culledShadow;
2020-10-01 21:05:47 +02:00
default: null;
2020-09-13 19:08:55 +02:00
}
}
}