本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.Group.setName方法的典型用法代码示例。如果您正苦于以下问题:Java Group.setName方法的具体用法?Java Group.setName怎么用?Java Group.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.Group
的用法示例。
在下文中一共展示了Group.setName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ensureCapacity
import com.badlogic.gdx.scenes.scene2d.Group; //导入方法依赖的package包/类
private Group ensureCapacity(int level, String parent) {
if (parent != null) {
for (Actor a : getChildren())
if (a.getName().equals(parent)) return (Group) a;
}
while (getChildren().size <= level || parent != null) {
Group g = new Group();
g.setName(parent == null ? "" : parent);
g.setUserObject(level);
g.setVisible(getChildren().size == 0);
addActor(g);
if (parent != null) return g;
}
return (Group) getChildren().get(level);
}
示例2: readModelEntity
import com.badlogic.gdx.scenes.scene2d.Group; //导入方法依赖的package包/类
private void readModelEntity() {
Group group = getGroup();
if (group != null && modelEntity != null) {
group.setName(modelEntity.getName());
group.setPosition(modelEntity.getX(), modelEntity.getY());
group.setOrigin(modelEntity.getOriginX(), modelEntity.getOriginY());
group.setRotation(modelEntity.getRotation());
group.setScale(modelEntity.getScaleX(), modelEntity.getScaleY());
Color color = modelEntity.getColor();
if (color != null) {
group.setColor(color.getR(), color.getG(), color.getB(),
color.getA());
}
}
}
示例3: ShipActor
import com.badlogic.gdx.scenes.scene2d.Group; //导入方法依赖的package包/类
public ShipActor( OverdriveContext context ) {
super();
assetManager = context.getAssetManager();
assetManager.load( OVDConstants.ROOT_ATLAS, TextureAtlas.class );
assetManager.load( OVDConstants.SHIP_ATLAS, TextureAtlas.class );
assetManager.finishLoading();
shipFudgeGroup = new Group();
shipFudgeGroup.setName( "ShipFudgeGroup" );
this.addActor( shipFudgeGroup );
shipHullGroup = new Group();
shipHullGroup.setName( "ShipHullGroup" );
shipFudgeGroup.addActor( shipHullGroup );
shipFloorplanGroup = new Group();
shipFloorplanGroup.setName( "ShipFloorplanGroup" );
shipFudgeGroup.addActor( shipFloorplanGroup );
TextureAtlas rootAtlas = assetManager.get( OVDConstants.ROOT_ATLAS, TextureAtlas.class );
Sprite nullSprite = rootAtlas.createSprite( "nullResource" );
nullDrawable = new SpriteDrawable( nullSprite );
shieldImage = new Image( nullDrawable );
shipHullGroup.addActor( shieldImage );
baseImage = new Image( nullDrawable );
shipHullGroup.addActor( baseImage );
cloakImage = new Image( nullDrawable );
cloakImage.setVisible( false );
shipHullGroup.addActor( cloakImage );
floorImage = new Image( nullDrawable );
shipHullGroup.addActor( floorImage );
floorTiles = new ShipFloorTilesActor( context );
shipFloorplanGroup.addActor( floorTiles );
floorLines = new ShipFloorLinesActor( context );
shipFloorplanGroup.addActor( floorLines );
roomDecors = new ShipRoomDecorsActor( context );
shipFloorplanGroup.addActor( roomDecors );
wallLines = new ShipWallLinesActor( context );
shipFloorplanGroup.addActor( wallLines );
}