本文整理了Java中com.badlogic.gdx.scenes.scene2d.Group.drawChildren()
方法的一些代码示例,展示了Group.drawChildren()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group.drawChildren()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Group
类名称:Group
方法名:drawChildren
[英]Draws all children. #applyTransform(Batch,Matrix4) should be called before and #resetTransform(Batch)after this method if #setTransform(boolean) is true. If #setTransform(boolean) is false these methods don't need to be called, children positions are temporarily offset by the group position when drawn. This method avoids drawing children completely outside the #setCullingArea(Rectangle), if set.
[中]吸引所有的孩子#如果#setTransform(boolean)为true,则应在此方法之前调用applyTransform(Batch,Matrix4),并在此方法之后调用#resetTransform(Batch)。如果#setTransform(boolean)为false,则无需调用这些方法,绘制时,子位置将临时由组位置偏移。此方法避免了在#setCullingArea(矩形)(如果已设置)之外完全绘制子对象。
代码示例来源:origin: libgdx/libgdx
/** Draws the group and its children. The default implementation calls {@link #applyTransform(Batch, Matrix4)} if needed, then
* {@link #drawChildren(Batch, float)}, then {@link #resetTransform(Batch)} if needed. */
public void draw (Batch batch, float parentAlpha) {
if (transform) applyTransform(batch, computeTransform());
drawChildren(batch, parentAlpha);
if (transform) resetTransform(batch);
}
代码示例来源:origin: libgdx/libgdx
/** Draws the group and its children. The default implementation calls {@link #applyTransform(Batch, Matrix4)} if needed, then
* {@link #drawChildren(Batch, float)}, then {@link #resetTransform(Batch)} if needed. */
public void draw (Batch batch, float parentAlpha) {
if (transform) applyTransform(batch, computeTransform());
drawChildren(batch, parentAlpha);
if (transform) resetTransform(batch);
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** Draws the group and its children. The default implementation calls {@link #applyTransform(Batch, Matrix4)} if needed, then
* {@link #drawChildren(Batch, float)}, then {@link #resetTransform(Batch)} if needed. */
public void draw (Batch batch, float parentAlpha) {
if (transform) applyTransform(batch, computeTransform());
drawChildren(batch, parentAlpha);
if (transform) resetTransform(batch);
}
内容来源于网络,如有侵权,请联系作者删除!