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


Java Actions.action方法代码示例

本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.actions.Actions.action方法的典型用法代码示例。如果您正苦于以下问题:Java Actions.action方法的具体用法?Java Actions.action怎么用?Java Actions.action使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.gdx.scenes.scene2d.actions.Actions的用法示例。


在下文中一共展示了Actions.action方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: show

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
@Override
public void show() {
    title.setPosition(game.SCREEN_WIDTH / 2 - title.getWidth() / 2, 800);
    //helpTip.setPosition(400-helpTip.getWidth()/2, 30);

    MoveToAction actionMove = Actions.action(MoveToAction.class);
    actionMove.setPosition(game.SCREEN_WIDTH / 2 - title.getWidth() / 2, 380);
    actionMove.setDuration(1);
    actionMove.setInterpolation(Interpolation.elasticOut);
    title.addAction(actionMove);

    if (!music.isPlaying()) {
        music = Assets.getManager().get("snd/menu_music.mp3", Music.class);
        music.play();
    }


    showMenu(true);
}
 
开发者ID:polyrob,项目名称:QuickFlix,代码行数:20,代码来源:MenuScene.java

示例2: showMenu

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
private void showMenu(boolean flag) {
    MoveToAction actionMove1 = Actions.action(MoveToAction.class);//out
    actionMove1.setPosition(game.SCREEN_WIDTH / 2, -200);
    actionMove1.setDuration(1);
    actionMove1.setInterpolation(Interpolation.swingIn);

    MoveToAction actionMove2 = Actions.action(MoveToAction.class);//in
    actionMove2.setPosition(game.SCREEN_WIDTH / 2, 190);
    actionMove2.setDuration(1f);
    actionMove2.setInterpolation(Interpolation.swing);

    if (flag) {
        table.addAction(actionMove2);
        options.addAction(actionMove1);
    } else {
        options.addAction(actionMove2);
        table.addAction(actionMove1);
    }
    menuShown = flag;
    exitShown = false;
}
 
开发者ID:polyrob,项目名称:QuickFlix,代码行数:22,代码来源:MenuScene.java

示例3: showExit

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
private void showExit(boolean flag) {
    MoveToAction actionMove1 = Actions.action(MoveToAction.class);//out
    actionMove1.setPosition(game.SCREEN_WIDTH / 2, -200);
    actionMove1.setDuration(1);
    actionMove1.setInterpolation(Interpolation.swingIn);

    MoveToAction actionMove2 = Actions.action(MoveToAction.class);//in
    actionMove2.setPosition(game.SCREEN_WIDTH / 2, 190);
    actionMove2.setDuration(1f);
    actionMove2.setInterpolation(Interpolation.swing);

    if (flag) {
        exit.addAction(actionMove2);
        table.addAction(actionMove1);
    } else {
        table.addAction(actionMove2);
        exit.addAction(actionMove1);
    }
    exitShown = flag;
}
 
开发者ID:polyrob,项目名称:QuickFlix,代码行数:21,代码来源:MenuScene.java

示例4: rocketEngineAnimation

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
public void rocketEngineAnimation(){
    MoveToAction action = Actions.action(MoveToAction.class);
      action.setPosition(game.rocket.getX(), 60);
      action.setInterpolation(Interpolation.swingIn);
      action.setDuration(0.8f);
      game.rocket.addAction(action);   
}
 
开发者ID:rincewindcz,项目名称:LiftOffGame,代码行数:8,代码来源:GameScreen.java

示例5: rocketCrashAnimation

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
public void rocketCrashAnimation() {
  MoveToAction action = Actions.action(MoveToAction.class);
      action.setPosition(420, 0);
      action.setDuration(1f);
      game.rocket.addAction(action);
      
      RotateToAction action2 = Actions.action(RotateToAction.class);
      action2.setRotation(-180f);
      action2.setDuration(1f);
      game.rocket.addAction(action2);
}
 
开发者ID:rincewindcz,项目名称:LiftOffGame,代码行数:12,代码来源:GameScreen.java

示例6: rocketPlatformOnAnimation

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
public void rocketPlatformOnAnimation(){
    MoveToAction action = Actions.action(MoveToAction.class);
      action.setPosition(-100, 100);
      action.setDuration(1f);
      game.platform.addAction(action);
      
      AlphaAction action6 = Actions.action(AlphaAction.class);
     // action6.setRotation(90f);
      action6.setColor(Color.CLEAR);
      action6.setDuration(1f);
      game.platform.addAction(action6);
}
 
开发者ID:rincewindcz,项目名称:LiftOffGame,代码行数:13,代码来源:GameScreen.java

示例7: fadeIn

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
/** @param music volume will be set to zero and slowly faded in to the target.
 * @param time fading duration.
 * @param volume volume target.
 * @return action that fades in the music. */
public static Action fadeIn(final Music music, final float time, final float volume) {
    final MusicFadingAction action = Actions.action(MusicFadingAction.class);
    music.setVolume(0f);
    action.setData(music, time, volume);
    return action;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:11,代码来源:MusicFadingAction.java

示例8: setVolume

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
/** @param music its volume will be modified.
 * @param from starting volume value.
 * @param to target volume value.
 * @param duration length of the transition.
 * @param interpolation decides how the volume is changed in time.
 * @return {@link VolumeAction} instance which should be added to a stage. */
public static VolumeAction setVolume(final Music music, final float from, final float to, final float duration,
        final Interpolation interpolation) {
    final VolumeAction action = Actions.action(VolumeAction.class);
    action.start = from;
    action.end = to;
    action.music = music;
    action.setDuration(duration);
    action.setInterpolation(interpolation);
    return action;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:17,代码来源:VolumeAction.java

示例9: transition

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
public static ScreenTransitionAction transition (ScreenTransitionType type, float duration) {
    ScreenTransitionAction action = Actions.action(ScreenTransitionAction.class);
    action.setTransitionType(type);
    action.setTransitionDuration(duration);
    return action;
}
 
开发者ID:Mignet,项目名称:Inspiration,代码行数:7,代码来源:ScreenTransitionAction.java

示例10: create

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
public static PostAction create(int skipFrames, Action action) {
    PostAction postAction = Actions.action(PostAction.class);
    postAction.setAction(action);
    postAction.framesLeft = skipFrames;
    return postAction;
}
 
开发者ID:crashinvaders,项目名称:gdx-texture-packer-gui,代码行数:7,代码来源:PostAction.java

示例11: fadeOut

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
/** @param music volume will be slowly faded to 0.
 * @param time fading duration.
 * @return action that fades out the music. */
public static Action fadeOut(final Music music, final float time) {
    final MusicFadingAction action = Actions.action(MusicFadingAction.class);
    action.setData(music, time, 0f);
    return action;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:9,代码来源:MusicFadingAction.java

示例12: stop

import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
/** @param music will be stopped.
 * @return a {@link MusicStopAction} instance, which will stop the theme once executed. */
public static MusicStopAction stop(final Music music) {
    final MusicStopAction action = Actions.action(MusicStopAction.class);
    action.music = music;
    return action;
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:8,代码来源:MusicStopAction.java


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