本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.ProgressBar.setAnimateDuration方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressBar.setAnimateDuration方法的具体用法?Java ProgressBar.setAnimateDuration怎么用?Java ProgressBar.setAnimateDuration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.ui.ProgressBar
的用法示例。
在下文中一共展示了ProgressBar.setAnimateDuration方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar; //导入方法依赖的package包/类
@Override
public void start() {
finishedLoading = false;
stage = new Stage(new ScreenViewport());
skin = createSkin();
Image image= new Image(skin, "bg");
image.setScaling(Scaling.stretch);
image.setFillParent(true);
stage.addActor(image);
root = new Table();
root.setFillParent(true);
stage.addActor(root);
progressBar = new ProgressBar(0, 1, .01f, false, skin);
progressBar.setAnimateDuration(.1f);
root.add(progressBar).growX().expandY().pad(20.0f);
}
示例2: LoadingScreen
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar; //导入方法依赖的package包/类
public LoadingScreen(PongForAndroid game) {
this.game = game;
setupAssetManager();
Skin skin = new Skin(Gdx.files.internal("uiskin.json"));
stage = new Stage();
table = new Table();
table.setFillParent(true);
BitmapFont loadingFont = getLoadingFont();
LabelStyle loadingStyle = new LabelStyle(loadingFont, Color.WHITE);
Label loadLabel = new Label("Loading...", loadingStyle);
progressBar = new ProgressBar(0, 100, 1, false, skin);
progressBar.setAnimateDuration(1f);
progressBar.setAnimateInterpolation(Interpolation.sine);
table.add(loadLabel);
table.row();
table.add(progressBar).left();
stage.addActor(table);
}
示例3: EnegryBar
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar; //导入方法依赖的package包/类
public EnegryBar(int width, int height, int x, int y) {
energyBar = new ProgressBar(0, LevelMap.getLevel().getMaxEnergy(), 0.5f, true, /*GDefence.getInstance().assetLoader.getEnergyBarSkin()*/ GDefence.getInstance().assetLoader.getSkin(), "energy-bar");
energyBar.getStyle().background.setMinWidth(width);
energyBar.getStyle().knobBefore.setMinWidth(width - 2);
energyBar.setPosition(x, y);
//setPosition(Gdx.graphics.getWidth() - expBarSize[0], userlevelButton.getY() - expBarSize[1] - 4);
energyBar.setSize(width, height);
energyBar.setValue(LevelMap.getLevel().getEnergyNumber());
energyBar.setAnimateDuration(0.5f);
addActor(energyBar);
initLabel();
}
示例4: ProgressDialog
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar; //导入方法依赖的package包/类
public ProgressDialog(ProgressDialogStyle style) {
super(style);
current = new Label("", style.textStyle);
progressBar = new ProgressBar(0, 1, 1, false, style.progressBarStyle);
progressBar.setHeight(style.barHeight);
progressBar.setAnimateDuration(0.1f);
textLabel = new Label("", style.textStyle);
}
示例5: process
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar; //导入方法依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final ProgressBar actor,
final String rawAttributeData) {
actor.setAnimateDuration(parser.parseFloat(rawAttributeData, actor));
}