• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java InvadersScreen类的典型用法和代码示例

java 1次浏览

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

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

示例1: render

点赞 2

import com.badlogic.invaders.screens.InvadersScreen; //导入依赖的package包/类
@Override
public void render () {
	InvadersScreen currentScreen = getScreen();

	// update the screen
	currentScreen.render(Gdx.graphics.getDeltaTime());

	// When the screen is done we change to the
	// next screen. Ideally the screen transitions are handled
	// in the screen itself or in a proper state machine.
	if (currentScreen.isDone()) {
		// dispose the resources of the current screen
		currentScreen.dispose();

		// if the current screen is a main menu screen we switch to
		// the game loop
		if (currentScreen instanceof MainMenu) {
			setScreen(new GameLoop(this));
		} else {
			// if the current screen is a game loop screen we switch to the
			// game over screen
			if (currentScreen instanceof GameLoop) {
				setScreen(new GameOver(this));
			} else if (currentScreen instanceof GameOver) {
				// if the current screen is a game over screen we switch to the
				// main menu screen
				setScreen(new MainMenu(this));
			}
		}
	}

	fps.log();
}
 

开发者ID:Motsai,
项目名称:neblina-libgdx3d,
代码行数:34,
代码来源:Invaders.java

示例2: render

点赞 2

import com.badlogic.invaders.screens.InvadersScreen; //导入依赖的package包/类
@Override
public void render() {
    InvadersScreen currentScreen = getScreen();

    // update the screen
    currentScreen.render(Gdx.graphics.getDeltaTime());

    // When the screen is done we change to the
    // next screen. Ideally the screen transitions are handled
    // in the screen itself or in a proper state machine.
    if (currentScreen.isDone()) {
        // dispose the resources of the current screen
        currentScreen.dispose();

        // if the current screen is a main menu screen we switch to
        // the game loop
        if (currentScreen instanceof MainMenu) {
            setScreen(new GameLoop(this, gSCapture));
        } else {
            // if the current screen is a game loop screen we switch to the
            // game over screen
            if (currentScreen instanceof GameLoop) {
                setScreen(new GameOver(this));
            } else if (currentScreen instanceof GameOver) {
                // if the current screen is a game over screen we switch to the
                // main menu screen
                setScreen(new MainMenu(this));
            }
        }
    }

    fps.log();
}
 

开发者ID:jiangerji,
项目名称:android-screen-recorder,
代码行数:34,
代码来源:Invaders.java

示例3: render

点赞 2

import com.badlogic.invaders.screens.InvadersScreen; //导入依赖的package包/类
@Override
public void render () {
	InvadersScreen currentScreen = getScreen();

	// update the screen
	currentScreen.render(Gdx.graphics.getDeltaTime());

	// When the screen is done we change to the
	// next screen. Ideally the screen transitions are handled
	// in the screen itself or in a proper state machine.
	if (currentScreen.isDone()) {
		// dispose the resources of the current screen
		currentScreen.dispose();

		// if the current screen is a main menu screen we switch to
		// the game loop
		if (currentScreen instanceof MainMenu) {
			setScreen(new GameLoop(this));
		} else {
			// if the current screen is a game loop screen we switch to the
			// game over screen
			if (currentScreen instanceof GameLoop) {
				setScreen(new GameOver(this));
			} else if (currentScreen instanceof GameOver) {
				// if the current screen is a game over screen we switch to the
				// main menu screen
				setScreen(new MainMenu(this));
			}
		}
	}

	// fps.log();
}
 

开发者ID:libgdx,
项目名称:libgdx-demo-invaders,
代码行数:34,
代码来源:Invaders.java

示例4: getScreen

点赞 2

import com.badlogic.invaders.screens.InvadersScreen; //导入依赖的package包/类
/** For this game each of our screens is an instance of InvadersScreen.
 * @return the currently active {@link InvadersScreen}. */
@Override
public InvadersScreen getScreen () {
	return (InvadersScreen)super.getScreen();
}
 

开发者ID:Motsai,
项目名称:neblina-libgdx3d,
代码行数:7,
代码来源:Invaders.java

示例5: getScreen

点赞 1

import com.badlogic.invaders.screens.InvadersScreen; //导入依赖的package包/类
/**
 * For this game each of our screens is an instance of InvadersScreen.
 * 
 * @return the currently active {@link InvadersScreen}.
 */
@Override
public InvadersScreen getScreen() {
    return (InvadersScreen) super.getScreen();
}
 

开发者ID:jiangerji,
项目名称:android-screen-recorder,
代码行数:10,
代码来源:Invaders.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)