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


Java GamesInProgress.Info方法代碼示例

本文整理匯總了Java中com.shatteredpixel.shatteredpixeldungeon.GamesInProgress.Info方法的典型用法代碼示例。如果您正苦於以下問題:Java GamesInProgress.Info方法的具體用法?Java GamesInProgress.Info怎麽用?Java GamesInProgress.Info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.shatteredpixel.shatteredpixeldungeon.GamesInProgress的用法示例。


在下文中一共展示了GamesInProgress.Info方法的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.Info方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。