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


Java Bundle.getBundle方法代码示例

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


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

示例1: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle(Bundle bundle) {

			Bundle node = bundle.getBundle(NODE);

			if (!node.isNull() && (spawned = node.getBoolean(SPAWNED))) {

				type = node.getInt(TYPE);
				given = node.getBoolean(GIVEN);
				processed = node.getBoolean(PROCESSED);

				depth = node.getInt(DEPTH);

				weapon = (Weapon) node.get(WEAPON);
				armor = (Armor) node.get(ARMOR);
			} else {
				reset();
			}
		}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:19,代码来源:Ghost.java

示例2: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle(Bundle bundle) {
	super.restoreFromBundle(bundle);
	sandBags = bundle.getInt(SANDBAGS);

	// these buffs belong to hourglass, need to handle unbundling within the
	// hourglass class.
	if (bundle.contains(BUFF)) {
		Bundle buffBundle = bundle.getBundle(BUFF);

		if (buffBundle.contains(timeFreeze.PARTIALTIME))
			activeBuff = new timeFreeze();
		else
			activeBuff = new timeStasis();

		activeBuff.restoreFromBundle(buffBundle);
	}
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:19,代码来源:TimekeepersHourglass.java

示例3: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle( Bundle bundle ) {

			Bundle node = bundle.getBundle( NODE );
			
			if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) {

				//TODO remove when pre-0.3.2 saves are no longer supported
				if (node.contains(TYPE)) {
					type = node.getInt(TYPE);
				} else {
					type = node.getBoolean("alternative")? 1 : 3;
				}
				
				given = node.getBoolean( GIVEN );
				
				wand1 = (Ring)node.get( WAND1 );
				wand2 = (Ring)node.get( WAND2 );

				if (type == 2){
					CeremonialCandle.ritualPos = node.getInt( RITUALPOS );
				}

			} else {
				reset();
			}
		}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:27,代码来源:Wandmaker.java

示例4: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle( Bundle bundle ) {
	
	Bundle node = bundle.getBundle( NODE );

	if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) {

		type = node.getInt(TYPE);
		given	= node.getBoolean( GIVEN );
		processed = node.getBoolean( PROCESSED );

		depth	= node.getInt( DEPTH );
		
		weapon	= (Weapon)node.get( WEAPON );
		armor	= (Armor)node.get( ARMOR );
	} else {
		reset();
	}
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:19,代码来源:Ghost.java

示例5: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	super.restoreFromBundle(bundle);
	sandBags = bundle.getInt( SANDBAGS );

	//these buffs belong to hourglass, need to handle unbundling within the hourglass class.
	if (bundle.contains( BUFF )){
		Bundle buffBundle = bundle.getBundle( BUFF );

		if (buffBundle.contains( timeFreeze.PARTIALTIME ))
			activeBuff = new timeFreeze();
		else
			activeBuff = new timeStasis();

		activeBuff.restoreFromBundle(buffBundle);
	}
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:18,代码来源:TimekeepersHourglass.java

示例6: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle( Bundle bundle ) {

			Bundle node = bundle.getBundle( NODE );
			
			if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) {
				
				type = node.getEnum( TYPE, Type.class );
				if (type == Type.ILLEGAL) {
					type = node.getBoolean( ALTERNATIVE ) ? Type.DUST : Type.BERRY;
				}
				
				given = node.getBoolean( GIVEN );
				
				wand1 = (Wand)node.get( WAND1 );
				wand2 = (Wand)node.get( WAND2 );
			} else {
				reset();
			}
		}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:20,代码来源:Wandmaker.java

示例7: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle( Bundle bundle ) {
	
	Bundle node = bundle.getBundle( NODE );
	
	if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) {
		
		type = node.getEnum( TYPE, Type.class );
		if (type == Type.ILLEGAL) {
			type = node.getBoolean( ALTERNATIVE ) ? Type.RAT : Type.ROSE;
		}
		if (type == Type.ROSE) {
			left2kill = node.getInt( LEFT2KILL );
		}
		
		given	= node.getBoolean( GIVEN );
		depth	= node.getInt( DEPTH );
		processed	= node.getBoolean( PROCESSED );
		
		weapon	= (Weapon)node.get( WEAPON );
		armor	= (Armor)node.get( ARMOR );
	} else {
		reset();
	}
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:25,代码来源:Ghost.java

示例8: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle(Bundle bundle) {

			Bundle node = bundle.getBundle(NODE);

			if (!node.isNull() && (spawned = node.getBoolean(SPAWNED))) {
				alternative = node.getBoolean(ALTERNATIVE);

				given = node.getBoolean(GIVEN);
				completed = node.getBoolean(COMPLETED);
				reward = (Ring) node.get(REWARD);
			}
		}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:13,代码来源:Imp.java

示例9: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle(Bundle bundle) {

			Bundle node = bundle.getBundle(NODE);

			if (!node.isNull() && (spawned = node.getBoolean(SPAWNED))) {
				alternative = node.getBoolean(ALTERNATIVE);
				given = node.getBoolean(GIVEN);
				completed = node.getBoolean(COMPLETED);
				reforged = node.getBoolean(REFORGED);
			} else {
				reset();
			}
		}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:14,代码来源:Blacksmith.java

示例10: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle( Bundle bundle ) {

			Bundle node = bundle.getBundle( NODE );
			
			if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) {
				alternative	= node.getBoolean( ALTERNATIVE );
				
				given = node.getBoolean( GIVEN );
				completed = node.getBoolean( COMPLETED );
				reward = (Ring)node.get( REWARD );
			}
		}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:13,代码来源:Imp.java

示例11: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle( Bundle bundle ) {

			Bundle node = bundle.getBundle( NODE );
			
			if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) {
				alternative	=  node.getBoolean( ALTERNATIVE );
				given = node.getBoolean( GIVEN );
				completed = node.getBoolean( COMPLETED );
				reforged = node.getBoolean( REFORGED );
			} else {
				reset();
			}
		}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:14,代码来源:Blacksmith.java

示例12: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static void restoreFromBundle(Bundle bundle) {

			Bundle node = bundle.getBundle(NODE);

			if (!node.isNull() && (spawned = node.getBoolean(SPAWNED))) {

				alternative = node.getBoolean(ALTERNATIVE);

				given = node.getBoolean(GIVEN);

				wand1 = (Wand) node.get(WAND1);
				wand2 = (Wand) node.get(WAND2);
			} else {
				reset();
			}
		}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:17,代码来源:Wandmaker.java

示例13: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {

	//conversion logic for pre-0.3.4 saves
	if (bundle.contains( REASON )){
		String info = bundle.getString( REASON ).toLowerCase(Locale.ENGLISH);
		if (info.equals("obtained the amulet of yendor"))   cause = Amulet.class;
		else if (info.contains("goo"))                      cause = Goo.class;
		else if (info.contains("tengu"))                    cause = Tengu.class;
		else if (info.contains("dm-300"))                   cause = DM300.class;
		else if (info.contains("king"))                     cause = King.class;
		else if (info.contains("yog"))                      cause = Yog.class;
		else if (info.contains("fist"))                     cause = Yog.class;
		else if (info.contains("larva"))                    cause = Yog.class;
		else if (info.equals("burned to ash"))              cause = Burning.class;
		else if (info.equals("starved to death"))           cause = Hunger.class;
		else if (info.equals("succumbed to poison"))        cause = Poison.class;
		else if (info.equals("suffocated"))                 cause = ToxicGas.class;
		else if (info.equals("bled to death"))              cause = Bleeding.class;
		else if (info.equals("melted away"))                cause = Ooze.class;
		else if (info.equals("died on impact"))             cause = Chasm.class;
		//can't get the all, just keep what remains as-is
		else                                                this.info = info;
	} else {
		cause   = bundle.getClass( CAUSE );
	}

	win		= bundle.getBoolean( WIN );
	score	= bundle.getInt( SCORE );
	
	heroClass	= HeroClass.restoreInBundle( bundle );
	armorTier	= bundle.getInt( TIER );
	
	if (bundle.contains(FILE))  gameFile = bundle.getString(FILE);
	if (bundle.contains(DATA))  gameData = bundle.getBundle(DATA);
	if (bundle.contains(ID))    gameID = bundle.getString(ID);

	depth = bundle.getInt( DEPTH );
	herolevel = bundle.getInt( LEVEL );

}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:42,代码来源:Rankings.java


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