extends Area enum LOD {DISTANCE,MID,CLOSE} var lod = -1 func lod_update(): for obj in $"gen_tree".get_children(): match lod: LOD.CLOSE: obj.lod_close() LOD.MID: obj.lod_mid() LOD.DISTANCE: obj.lod_distance() _: obj.lod_distance()