本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.Group.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Java Group.setVisible方法的具体用法?Java Group.setVisible怎么用?Java Group.setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.Group
的用法示例。
在下文中一共展示了Group.setVisible方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCarouselExtension
import com.badlogic.gdx.scenes.scene2d.Group; //导入方法依赖的package包/类
private void createCarouselExtension() {
lookup = manager.getAssetsExtension().getTexture(NameFiles.progressbarcircular);
lookup.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
groupCarousel = new Group();
arrayGroup = new Group[4];
arrayGroup[2] = addoneExtension("GAMMA SHIELD", NameFiles.imageExtensionGammaShield,9,8,5,7,23);
arrayGroup[2].setScale(0.8f);
arrayGroup[2].setPosition(Gdx.graphics.getWidth() * 0.1f, 0);
groupCarousel.addActor(arrayGroup[2]);
arrayGroup[3] = addoneExtension("SHIELD",NameFiles.imageExtensionRegularShield,7.5,8,4,6,23);
arrayGroup[3].setScale(0.8f);
arrayGroup[3].setPosition(Gdx.graphics.getWidth() * 0.1f, Gdx.graphics.getHeight() * 0.28f);
groupCarousel.addActor(arrayGroup[3]);
arrayGroup[1] = addoneExtension("AUTO TURRET", NameFiles.imageExtensionAutoTurret,9,5,7,3,8);
arrayGroup[1].setScale(0.8f);
arrayGroup[1].setPosition(Gdx.graphics.getWidth() * 0.1f, -Gdx.graphics.getHeight() * 0.1f);
groupCarousel.addActor(arrayGroup[1]);
arrayGroup[0] = addoneExtension("REMOTE TURRET", NameFiles.imageExtensionRemoteTurret, 5, 2, 8.5, 7,45);
groupCarousel.addActor(arrayGroup[0]);
groupCarousel.setVisible(false);
}
示例2: 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);
}
示例3: addtimerbuildroom
import com.badlogic.gdx.scenes.scene2d.Group; //导入方法依赖的package包/类
private void addtimerbuildroom(){
grouptimerbuild = new Group();
Image bg = new Image(new TextureRegion(manager.getAssetsExtension().getTexture(NameFiles. extensionImgBackground)));
bg.setSize(Gdx.graphics.getWidth() / 2.75f, Gdx.graphics.getHeight() * 0.33f);
bg.setPosition(Gdx.graphics.getWidth() / 2 - bg.getWidth() / 2, Gdx.graphics.getHeight()*0.35f);
grouptimerbuild.addActor(bg);
Label labelBuildingRoom = new Label("Installing\nExtension",new Label.LabelStyle(Font.getFont((int)(Gdx.graphics.getHeight()*0.025)),Color.WHITE));
labelBuildingRoom.setPosition(Gdx.graphics.getWidth() / 2 - labelBuildingRoom.getWidth() / 2, Gdx.graphics.getHeight() / 1.65f);
grouptimerbuild.addActor(labelBuildingRoom);
labelprocent = new Label("0%",new Label.LabelStyle(new Label.LabelStyle(Font.getFont((int)(Gdx.graphics.getHeight()*0.03)),Color.WHITE)));
labelprocent.setPosition(Gdx.graphics.getWidth() / 2 - labelprocent.getWidth() / 2, Gdx.graphics.getHeight() / 2f - labelprocent.getHeight() / 2);
grouptimerbuild.addActor(labelprocent);
grouptimerbuild.setVisible(false);
}
示例4: addtimerbuildroom
import com.badlogic.gdx.scenes.scene2d.Group; //导入方法依赖的package包/类
private void addtimerbuildroom(){
grouptimerbuild = new Group();
Image bg = new Image(new TextureRegion(manager.getAssetsRooms().getTexture(NameFiles.extensionImgBackground)));
bg.setSize(Gdx.graphics.getWidth() / 2.75f, Gdx.graphics.getHeight() *0.32f);
bg.setPosition(Gdx.graphics.getWidth() / 2 - bg.getWidth() / 2, Gdx.graphics.getHeight() / 5f);
grouptimerbuild.addActor(bg);
Label labelBuildingRoom = new Label("Building Room",new Label.LabelStyle(Font.getFont((int)(Gdx.graphics.getHeight()*0.025)), Color.WHITE));
labelBuildingRoom.setPosition(Gdx.graphics.getWidth() / 2 - labelBuildingRoom.getWidth() / 2, Gdx.graphics.getHeight() / 2.2f);
grouptimerbuild.addActor(labelBuildingRoom);
labelprocent = new Label("0%",new Label.LabelStyle(new Label.LabelStyle(Font.getFont((int)(Gdx.graphics.getHeight()*0.03)),Color.WHITE)));
labelprocent.setPosition(Gdx.graphics.getWidth() / 2 - labelprocent.getWidth() / 2, Gdx.graphics.getHeight() / 3.1f);
grouptimerbuild.addActor(labelprocent);
grouptimerbuild.setVisible(false);
}
示例5: showGroup
import com.badlogic.gdx.scenes.scene2d.Group; //导入方法依赖的package包/类
private void showGroup(Group group) {
groupError.setVisible(false);
groupChecking.setVisible(false);
groupUpdateDetails.setVisible(false);
groupUpToDate.setVisible(false);
group.setVisible(true);
}