当前位置: 首页>>代码示例>>Java>>正文


Java RunnableAction类代码示例

本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.actions.RunnableAction的典型用法代码示例。如果您正苦于以下问题:Java RunnableAction类的具体用法?Java RunnableAction怎么用?Java RunnableAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RunnableAction类属于com.badlogic.gdx.scenes.scene2d.actions包,在下文中一共展示了RunnableAction类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hide

import com.badlogic.gdx.scenes.scene2d.actions.RunnableAction; //导入依赖的package包/类
private void hide() {
    shown = false;
    hiding = true;
    Gdx.input.setInputProcessor(lastInputProcessor);

    addAction(Actions.sequence(
            Actions.moveTo(0, Gdx.graphics.getHeight(), 0.5f, Interpolation.swingIn),
            new RunnableAction() {
                @Override
                public void run() {
                    hiding = false;
                }
            }
    ));
    scorer.resume();
}
 
开发者ID:LonamiWebs,项目名称:Klooni1010,代码行数:17,代码来源:PauseMenuStage.java

示例2: e

import com.badlogic.gdx.scenes.scene2d.actions.RunnableAction; //导入依赖的package包/类
public final void e()
{
  if (this.e == null)
    this.a = false;
  while (true)
  {
    return;
    an.b(this.f);
    Table localTable = this.e;
    RunnableAction localRunnableAction = new RunnableAction();
    localRunnableAction.setRunnable(new y(this, localTable));
    localTable.addAction(Actions.sequence(Actions.fadeOut(0.25F), localRunnableAction));
    this.f = false;
    Iterator localIterator = this.b.iterator();
    while (localIterator.hasNext())
      ((aa)localIterator.next()).b();
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:19,代码来源:ModalDialog.java

示例3: resumeGame

import com.badlogic.gdx.scenes.scene2d.actions.RunnableAction; //导入依赖的package包/类
private void resumeGame() {
    pauseButton.addAction(Actions.sequence(Actions.visible(true), Actions.fadeIn(1)));
    mainMenuCell.getActor().addAction(Actions.sequence(Actions.fadeOut(1), Actions.visible(false), new RunnableAction() {
        @Override
        public void run() {
            inputHandler.onResume();
        }
    }));

}
 
开发者ID:ezet,项目名称:penguins-in-space,代码行数:11,代码来源:GameView.java

示例4: act

import com.badlogic.gdx.scenes.scene2d.actions.RunnableAction; //导入依赖的package包/类
@Override
public void act(float delta) {
    super.act(delta);
    table.act(delta);
    switch (state) {
        case 0:
            if(!Gdx.input.isTouched())
                state++;
            break;
        case 1:
            if(Gdx.input.isTouched())
                state++;
            break;
        case 2:
            if(!Gdx.input.isTouched()) {
                AlphaAction action = new AlphaAction();
                action.setAlpha(0f);
                action.setDuration(0.3f);
                addAction(new SequenceAction(action, new RunnableAction() {
                    @Override
                    public void run() {
                        remove();
                    }
                }));
                state++;
            }
            break;
    }
}
 
开发者ID:justinmarentette11,项目名称:Tower-Defense-Galaxy,代码行数:30,代码来源:MessageWindow.java

示例5: show

import com.badlogic.gdx.scenes.scene2d.actions.RunnableAction; //导入依赖的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

示例6: resize

import com.badlogic.gdx.scenes.scene2d.actions.RunnableAction; //导入依赖的package包/类
@Override
public void resize(int width, int height) {
    stage.getViewport().update(width, height, true);

    float scale = Math.min(width, height) / (logoImage.getWidth() * 1.3f);
    if (scale < 1) {
        logoImage.setScale(scale);
    } else {
        scale = 1;
    }
    logoImage.setPosition(width / 2 - logoImage.getWidth() / 2 * scale,
            height / 2 - logoImage.getHeight() / 2 * scale);
    logoImage.clearActions();
    logoImage.getColor().a = 0;
    logoImage.setScale(scale, 0.3f * scale);
    Action act = sequence(parallel(alpha(1, 3), scaleTo(scale, scale, 2)),
            delay(0.5f), parallel(alpha(0, 0.7f)), new RunnableAction() {
                @Override
                public void run() {
                    manager.showMenu();
                }
            });
    logoImage.addAction(act);

    label.getColor().a = 0;
    label.setPosition(width / 2 - label.getWidth() / 2, 10);
    label.addAction(sequence(alpha(0.5f, 2), alpha(0, 2)));
}
 
开发者ID:NaikSoftware,项目名称:SaveUA,代码行数:29,代码来源:SplashScreen.java

示例7: makeFlyAction

import com.badlogic.gdx.scenes.scene2d.actions.RunnableAction; //导入依赖的package包/类
private Action makeFlyAction(final Image cloud) {
	Action moveTo = Actions.moveTo(worldSize.x, cloud.getY(), MathUtils.random(30f, 45f));
	RunnableAction finished = Actions.run(new Runnable() {
		@Override
		public void run() {
			cloud.remove();
		}
	});

	return Actions.sequence(Actions.fadeIn(0.15f), moveTo, finished);
}
 
开发者ID:frigidplanet,项目名称:droidtowers,代码行数:12,代码来源:SplashCloudLayer.java

示例8: startAction

import com.badlogic.gdx.scenes.scene2d.actions.RunnableAction; //导入依赖的package包/类
public void startAction(RunnableAction action) {
    table.addAction(new SequenceAction(getDefaultHideAnimation(), action));
}
 
开发者ID:ezet,项目名称:penguins-in-space,代码行数:4,代码来源:BaseMenuView.java


注:本文中的com.badlogic.gdx.scenes.scene2d.actions.RunnableAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。