layer.index
The order index for this layer. Sibling layers with a higher index (and the same z value) will drawn on top of this layer, and those with a lower index below.
The layer index increases by order of insertion. So if you add a layer as a child and the highest sibling index value is 5, the index of the inserted layer will be 6 (5 + 1). Or, the last inserted layer will always be on top.
译:此层的顺序索引。 同级层更高的指数和相同的z值将画在这一层的顶部,有以下低指数。
图层索引增加插入顺序。所以如果你添加了一层一层和同级指数最高值为5,插入层的索引将6 (5+1)。或者,最后插入层总是在上面。
layerA = new Layer
layerB = new Layer
# Draw layerB on top
layerA.index = 2
layerB.index = 1