當前位置: 首頁>>代碼示例>>Java>>正文


Java Game類代碼示例

本文整理匯總了Java中com.badlogic.gdx.Game的典型用法代碼示例。如果您正苦於以下問題:Java Game類的具體用法?Java Game怎麽用?Java Game使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Game類屬於com.badlogic.gdx包,在下文中一共展示了Game類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: leaveScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveScreen(){
    Timeline.createParallel().beginParallel()
            .push(Tween.to(right, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(left, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(up, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(down, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(descend, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rx, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(ry, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rz, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(pause, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(cam, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(quit, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(question, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(scoreLabel, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(textLabel, ActorAccessor.Y, 2.5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
        @Override
        public void onEvent(int type, BaseTween<?> source) {
            ((Game)Gdx.app.getApplicationListener()).setScreen(new GameOver(score, ScoreManager.CH4,done));
        }
    }).start(tweenManager);
}
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:23,代碼來源:MethaneLevel.java

示例2: MenuScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
public MenuScreen(Game game) {
    Box2D.init();
    this.game = game;
    world = new World(new Vector2(0, 0), false);
    stage = new Stage(new StretchViewport(Constants.WIDTH, Constants.HEIGHT));

    preferences = new GamePreferences();
    audioManager = AudioManager.getInstance();
    Gdx.input.setInputProcessor(stage);

    FlappySpinner.gameManager.changeBackgroundColor("#4ec0ca");

    setUpBackground();
    setUpButtons();
    setUpLogo();
}
 
開發者ID:ZephyrVentum,項目名稱:FlappySpinner,代碼行數:17,代碼來源:MenuScreen.java

示例3: MarketScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
public MarketScreen(Game aGame) {
    this.aGame = aGame;
    audioManager = AudioManager.getInstance();
    preferences = new GamePreferences();
    stage = new Stage(new StretchViewport(Constants.WIDTH, Constants.HEIGHT));
    Gdx.input.setInputProcessor(stage);

    initSkins();

    setUpBackground();
    setUpHomeButton();
    setUpSkinImages();
    setUpNextButton();
    setUpPreviousButton();
    setUpUseButton();
    setUpBuyButton();
    setUpLabels();

    changeShownSkin();
}
 
開發者ID:ZephyrVentum,項目名稱:FlappySpinner,代碼行數:21,代碼來源:MarketScreen.java

示例4: SettingsScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
public SettingsScreen(Game game) {
    this.aGame = game;
    preferences = new GamePreferences();
    audioManager = AudioManager.getInstance();
    stage = new Stage(new StretchViewport(Constants.WIDTH, Constants.HEIGHT));
    Gdx.input.setInputProcessor(stage);

    setUpBackground();


    setUpLabels();

    setUpHomeButton();
    setUpMusicButton();
    setUpSoundButton();
    setUpGitHubButton();
}
 
開發者ID:ZephyrVentum,項目名稱:FlappySpinner,代碼行數:18,代碼來源:SettingsScreen.java

示例5: GameScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
/**
 * Constructor
 * @param game 
 */
public GameScreen(Game game, Client client, Server server)
{
    super(game, client, server);

    this.sendCommand = client.getSendCommand();
    this.camera = new OrthographicCamera();
    this.stage = new Stage(new StretchViewport(Constants.SCREENWIDTH, Constants.SCREENHEIGHT, camera));
    this.mapManager = new MapLoader(camera, sendCommand);
    this.entityManager = new EntityManager(camera, mapManager, sendCommand, inputHandler);
    this.processData = new ClientProcessData(entityManager, mapManager);
    this.mainPlayerHud = new MainPlayerHud(entityManager, game, server, client, mapManager, camera);
    this.camera.zoom = Constants.DEFAULTZOOM;

    // Controls
    if(Constants.ISRUNNINGONSMARTPHONE)
    {
        Gdx.input.setInputProcessor(mainPlayerHud.stage);
        camera.zoom = Constants.SMARTPHONEZOOM;
    }else
    {
        inputHandler.setInputSource(mainPlayerHud.stage);
        Gdx.input.setCursorCatched(true);
    }

}
 
開發者ID:Aeo-Informatik,項目名稱:Space-Bombs,代碼行數:30,代碼來源:GameScreen.java

示例6: fadeLogic

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void fadeLogic(float delta) {
    if (_fadeIn) {
        _fade -= FADE_SPEED * delta;
        if (_fade < 0) {
            _fadeIn = false;
            _fadeOut = true;
            _fade = -1;
        }
    } else if (_fadeOut && _delay > 0) {
        _delay -= delta;
    } else if (_fadeOut) {
        _fade += FADE_SPEED * delta;
        if (_fade > 1.5f) {
            ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu());
            return;
        }
    }
}
 
開發者ID:gjhutchison,項目名稱:pixelhorrorjam2016,代碼行數:19,代碼來源:SplashScreen.java

示例7: leaveScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveScreen(){
    Timeline.createParallel().beginParallel()
            .push(Tween.to(right, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(left, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(up, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(down, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(descend, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rx, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(ry, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rz, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(pause, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(cam, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(quit, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(question, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(scoreLabel, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(textLabel, ActorAccessor.Y, 2.5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
        @Override
        public void onEvent(int type, BaseTween<?> source) {
            ((Game)Gdx.app.getApplicationListener()).setScreen(new GameOver(score,ScoreManager.LEVEL_5,done));
        }
    }).start(tweenManager);
}
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:23,代碼來源:LevelFive.java

示例8: leaveScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveScreen(){
    Timeline.createParallel().beginParallel()
            .push(Tween.to(right, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(left, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(up, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(down, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(descend, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rx, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(ry, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rz, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(pause, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(cam, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(quit, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(question, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(scoreLabel, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(textLabel, ActorAccessor.Y, 2.5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
        @Override
        public void onEvent(int type, BaseTween<?> source) {
            ((Game)Gdx.app.getApplicationListener()).setScreen(new GameOver(score,ScoreManager.LEVEL_3,done));
        }
    }).start(tweenManager);
}
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:23,代碼來源:LevelThree.java

示例9: leaveAnimation

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveAnimation(final Screen setScreen){

        //setup a parallel event
        Timeline.createParallel().beginParallel()
                .push(Tween.to(heading, ActorAccessor.Y, 2f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(level1, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(level2, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(level3, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(level4, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(level5, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(level6, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l1, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l2, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l3, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l4, ActorAccessor.Y, .75f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l5, ActorAccessor.Y, .75f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l6, ActorAccessor.Y, .75f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(more, ActorAccessor.Y, .5f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l7, ActorAccessor.Y, .5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
            @Override
            public void onEvent(int type, BaseTween<?> source) {
                ((Game)Gdx.app.getApplicationListener()).setScreen(setScreen);
            }
        }).start(tweenManager);

    }
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:27,代碼來源:Levels.java

示例10: leaveScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveScreen(){
    Timeline.createParallel().beginParallel()
            .push(Tween.to(right, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(left, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(up, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(down, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(descend, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rx, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(ry, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rz, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(pause, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(cam, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(quit, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(question, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(scoreLabel, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(textLabel, ActorAccessor.Y, 2.5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
        @Override
        public void onEvent(int type, BaseTween<?> source) {
            ((Game)Gdx.app.getApplicationListener()).setScreen(new GameOver(score,ScoreManager.LEVEL_4,done));
        }
    }).start(tweenManager);
}
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:23,代碼來源:LevelFour.java

示例11: leaveScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveScreen(){
    Timeline.createParallel().beginParallel()
            .push(Tween.to(right, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(left, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(up, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(down, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(descend, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rx, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(ry, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rz, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(pause, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(cam, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(quit, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(question, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(scoreLabel, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(textLabel, ActorAccessor.Y, 2.5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
        @Override
        public void onEvent(int type, BaseTween<?> source) {
            ((Game)Gdx.app.getApplicationListener()).setScreen(new GameOver(score, ScoreManager.H2O,done));
        }
    }).start(tweenManager);
}
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:23,代碼來源:WaterLevel.java

示例12: leaveScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveScreen(){
    Timeline.createParallel().beginParallel()
            .push(Tween.to(right, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(left, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(up, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(down, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(descend, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rx, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(ry, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rz, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(pause, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(cam, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(quit, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(question, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(scoreLabel, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(textLabel, ActorAccessor.Y, 2.5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
        @Override
        public void onEvent(int type, BaseTween<?> source) {
            ((Game)Gdx.app.getApplicationListener()).setScreen(new GameOver(score,ScoreManager.LEVEL_1,done));
        }
    }).start(tweenManager);
}
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:23,代碼來源:LevelOne.java

示例13: leaveAnimation

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveAnimation(final Screen setScreen){

        //setup a parallel event
        Timeline.createParallel().beginParallel()
                .push(Tween.to(heading, ActorAccessor.Y, 2f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(level1, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l1, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(level2, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
                .push(Tween.to(l2, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
                .end().setCallback(new TweenCallback() {
            @Override
            public void onEvent(int type, BaseTween<?> source) {
                ((Game)Gdx.app.getApplicationListener()).setScreen(setScreen);
            }
        }).start(tweenManager);

    }
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:18,代碼來源:ElementLevels.java

示例14: leaveScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveScreen(){
    Timeline.createParallel().beginParallel()
            .push(Tween.to(right, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(left, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(up, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(down, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(descend, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rx, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(ry, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rz, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(pause, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(cam, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(quit, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(question, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(scoreLabel, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(textLabel, ActorAccessor.Y, 2.5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
        @Override
        public void onEvent(int type, BaseTween<?> source) {
            ((Game)Gdx.app.getApplicationListener()).setScreen(new GameOver(score,ScoreManager.LEVEL_6,done));
        }
    }).start(tweenManager);
}
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:23,代碼來源:LevelSix.java

示例15: leaveScreen

import com.badlogic.gdx.Game; //導入依賴的package包/類
private void leaveScreen(){
    Timeline.createParallel().beginParallel()
            .push(Tween.to(right, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(left, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(up, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(down, ActorAccessor.Y, 1f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(descend, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rx, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(ry, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(rz, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(pause, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(cam, ActorAccessor.Y, 1.25f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(quit, ActorAccessor.Y, 1.15f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(question, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(scoreLabel, ActorAccessor.Y, 1.5f).target(-Gdx.graphics.getHeight()))
            .push(Tween.to(textLabel, ActorAccessor.Y, 2.5f).target(-Gdx.graphics.getHeight())).end().setCallback(new TweenCallback() {
        @Override
        public void onEvent(int type, BaseTween<?> source) {
            ((Game)Gdx.app.getApplicationListener()).setScreen(new GameOver(score,ScoreManager.LEVEL_2,done));
        }
    }).start(tweenManager);
}
 
開發者ID:msk610,項目名稱:Chemtris,代碼行數:23,代碼來源:LevelTwo.java


注:本文中的com.badlogic.gdx.Game類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。