com.badlogic.gdx.scenes.scene2d.Group.drawChildren()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.Group.drawChildren()方法的一些代码示例,展示了Group.drawChildren()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group.drawChildren()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Group
类名称:Group
方法名:drawChildren

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);
}

相关文章

微信公众号

最新文章

更多