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


Java GamesInProgress类代码示例

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


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

示例1: preview

import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; //导入依赖的package包/类
public static void preview( GamesInProgress.Info info, Bundle bundle ) {
	info.level = bundle.getInt( LEVEL );
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:4,代码来源:Hero.java

示例2: updateClass

import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; //导入依赖的package包/类
private void updateClass( HeroClass cl ) {

        if (curClass == cl) {
            add( new WndClass( cl ) );
            return;
        }

        if (curClass != null) {
            shields.get( curClass ).highlight( false );
        }
        shields.get( curClass = cl ).highlight( true );

        if (cl != HeroClass.HUNTRESS || huntressUnlocked) {

            unlock.visible = false;

            float buttonPos = (Camera.main.height + HEIGHT) / 2 - BUTTON_HEIGHT;

            float left = (Camera.main.width - WIDTH) / 2;

            GamesInProgress.Info info = GamesInProgress.check( curClass );
            if (info != null) {

                btnLoad.visible = true;
                btnLoad.secondary( Utils.format( TXT_DPTH_LVL, info.depth, info.level ) );
                btnNewGame.visible = true;
                btnNewGame.secondary( TXT_ERASE );

                float w = (WIDTH - GAP) / 2;

                btnLoad.setRect(
                        left, buttonPos, w, BUTTON_HEIGHT );
                btnNewGame.setRect(
                        btnLoad.right() + GAP, buttonPos, w, BUTTON_HEIGHT );

            } else {
                btnLoad.visible = false;

                btnNewGame.visible = true;
                btnNewGame.secondary( null );
                btnNewGame.setRect( left, buttonPos, WIDTH, BUTTON_HEIGHT );
            }

        } else {

            unlock.visible = true;
            btnLoad.visible = false;
            btnNewGame.visible = false;

        }
    }
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:52,代码来源:StartScene.java

示例3: updateClass

import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; //导入依赖的package包/类
private void updateClass( HeroClass cl ) {

		if (curClass == cl) {
			add( new WndClass( cl ) );
			return;
		}

		if (curClass != null) {
			shields.get( curClass ).highlight( false );
		}
		shields.get( curClass = cl ).highlight( true );

		if (cl != HeroClass.HUNTRESS || huntressUnlocked) {

			unlock.visible = false;

			GamesInProgress.Info info = GamesInProgress.check( curClass );
			if (info != null) {

				btnLoad.visible = true;
				btnLoad.secondary( Messages.format( Messages.get(this, "depth_level"), info.depth, info.level ), info.challenges );
				btnNewGame.visible = true;
				btnNewGame.secondary( Messages.get(this, "erase"), false );

				float w = (Camera.main.width - GAP) / 2 - buttonX;

				btnLoad.setRect(
						buttonX, buttonY, w, BUTTON_HEIGHT );
				btnNewGame.setRect(
						btnLoad.right() + GAP, buttonY, w, BUTTON_HEIGHT );

			} else {
				btnLoad.visible = false;

				btnNewGame.visible = true;
				btnNewGame.secondary( null, false );
				btnNewGame.setRect( buttonX, buttonY, Camera.main.width - buttonX * 2, BUTTON_HEIGHT );
			}

		} else {

			unlock.visible = true;
			btnLoad.visible = false;
			btnNewGame.visible = false;

		}
	}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:48,代码来源:StartScene.java


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