本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.actions.DelayAction类的典型用法代码示例。如果您正苦于以下问题:Java DelayAction类的具体用法?Java DelayAction怎么用?Java DelayAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DelayAction类属于com.badlogic.gdx.scenes.scene2d.actions包,在下文中一共展示了DelayAction类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: refreshStyleProperties
import com.badlogic.gdx.scenes.scene2d.actions.DelayAction; //导入依赖的package包/类
public void refreshStyleProperties(boolean preserveScroll) {
if (stylePropertiesTable != null && stylePropertiesScrollPane != null) {
float scrollY;
if (preserveScroll) {
scrollY = stylePropertiesScrollPane.getScrollY();
} else {
scrollY = 0;
}
stylePropertiesTable.clearChildren();
addStyleProperties(stylePropertiesTable);
if (preserveScroll) {
validate();
stylePropertiesScrollPane.setSmoothScrolling(false);
stylePropertiesScrollPane.setScrollY(scrollY);
stylePropertiesScrollPane.addAction(new SequenceAction(new DelayAction(.1f), new Action() {
@Override
public boolean act(float delta) {
stylePropertiesScrollPane.setSmoothScrolling(true);
return true;
}
}));
}
}
}
开发者ID:raeleus,项目名称:skin-composer,代码行数:27,代码来源:RootTable.java
示例2: clickProgressBar
import com.badlogic.gdx.scenes.scene2d.actions.DelayAction; //导入依赖的package包/类
public void clickProgressBar(int screenX,int screenY){
if((screenX>barExperience.getX()) && (screenY <(Gdx.graphics.getHeight()-barExperience.getY())))
{
FadeIn();
gr.addAction(new DelayAction(5f));
Fadeout();
}
}
开发者ID:TudorRosca,项目名称:enklave,代码行数:9,代码来源:ProgressBarEnergy.java
示例3: ScreenLoading
import com.badlogic.gdx.scenes.scene2d.actions.DelayAction; //导入依赖的package包/类
public ScreenLoading(GameManager game) {
gameManager = game;
assets = ManagerAssets.getInstance();
MoveToAction mred = new MoveToAction();
mred.setPosition(Width , -Height);
mred.setDuration(2f);
MoveToAction mred1 = new MoveToAction();
mred1.setPosition(-Width , Height);
mred1.setDuration(0);
translatered = new RepeatAction();
translatered.setCount(RepeatAction.FOREVER);
translatered.setAction(new SequenceAction(new DelayAction(0.0f), mred,mred1, new DelayAction(4.0f)));
MoveToAction mgreen = new MoveToAction();
mgreen.setPosition(Width , -Height );
mgreen.setDuration(2f);
MoveToAction mgreen1 = new MoveToAction();
mgreen1.setPosition(-Width , Height);
mgreen1.setDuration(0);
translategreen = new RepeatAction();
translategreen.setCount(RepeatAction.FOREVER);
translategreen.setAction(new SequenceAction(new DelayAction(2.0f), mgreen,mgreen1, new DelayAction(4.0f)));
MoveToAction mblue = new MoveToAction();
mblue.setPosition(Width , -Height);
mblue.setDuration(2f);
MoveToAction mblue1 = new MoveToAction();
mblue1.setPosition(-Width , Height);
mblue1.setDuration(0);
translateblue = new RepeatAction();
translateblue.setCount(RepeatAction.FOREVER);
translateblue.setAction(new SequenceAction(new DelayAction(4.0f), mblue,mblue1,new DelayAction(4.0f)));
}
开发者ID:TudorRosca,项目名称:enklave,代码行数:32,代码来源:ScreenLoading.java
示例4: show
import com.badlogic.gdx.scenes.scene2d.actions.DelayAction; //导入依赖的package包/类
@Override
public Dialog show(Stage stage) {
Dialog dialog = super.show(stage);
RunnableAction runnableAction = new RunnableAction();
runnableAction.setRunnable(() -> {
if (runnable != null) {
runnable.run();
}
hide();
});
Action action = new SequenceAction(new DelayAction(.5f), runnableAction);
addAction(action);
return dialog;
}
开发者ID:raeleus,项目名称:skin-composer,代码行数:16,代码来源:DialogLoading.java
示例5: Fadeout
import com.badlogic.gdx.scenes.scene2d.actions.DelayAction; //导入依赖的package包/类
public void Fadeout(){
MoveToAction out = new MoveToAction();
out.setPosition(0.0f, Gdx.graphics.getHeight() * 0.1f);
out.setDuration(2f);
gr.addAction(new SequenceAction(new DelayAction(7f), out));
}
开发者ID:TudorRosca,项目名称:enklave,代码行数:7,代码来源:ProgressBarEnergy.java
示例6: showCharacterDialog
import com.badlogic.gdx.scenes.scene2d.actions.DelayAction; //导入依赖的package包/类
private void showCharacterDialog() {
Dialog dialog = new Dialog("", skin);
Label label = new Label("Choose a character...", skin);
dialog.getContentTable().add(label);
dialog.getContentTable().row();
Table table = new Table();
ScrollPane scrollPane = new ScrollPane(table, skin);
scrollPane.setFadeScrollBars(false);
dialog.getContentTable().add(scrollPane).grow();
final ButtonGroup<ImageTextButton> buttons = new ButtonGroup<ImageTextButton>();
for (String name : getCore().getImagePacks().get(DATA_PATH + "/characters")) {
Drawable drawable = new TextureRegionDrawable(getCore().getAtlas().findRegion(name));
Image image = new Image(drawable);
ImageTextButton imageTextButton = new ImageTextButton(name, skin, "list");
imageTextButton.getImageCell().setActor(image);
imageTextButton.getLabelCell().left().expandX();
table.add(imageTextButton).growX();
buttons.add(imageTextButton);
table.row();
}
dialog.getContentTable().row();
TextButton textButton = new TextButton("OK", skin);
dialog.getContentTable().add(textButton);
textButton.addListener(new ChangeListener() {
@Override
public void changed(ChangeListener.ChangeEvent event, Actor actor) {
getCore().getAssetManager().get(Core.DATA_PATH + "/sfx/coin.wav", Sound.class).play();
((GameState)getCore().getStateManager().getState("game")).setSelectedCharacter(buttons.getChecked().getText().toString());
Gdx.input.setInputProcessor(null);
Action changeStateAction = new Action() {
@Override
public boolean act(float delta) {
getCore().getStateManager().loadState("game");
return true;
}
};
root.addAction(new SequenceAction(new DelayAction(.5f), changeStateAction));
}
});
dialog.show(stage);
dialog.setSize(400.0f, 400.0f);
dialog.setPosition(stage.getWidth() / 2.0f, stage.getHeight() / 2.0f, Align.center);
stage.setScrollFocus(scrollPane);
}
开发者ID:raeleus,项目名称:bobbybird,代码行数:53,代码来源:MenuState.java
注:本文中的com.badlogic.gdx.scenes.scene2d.actions.DelayAction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论