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


Java Bundle.get方法代码示例

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


在下文中一共展示了Bundle.get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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包/类
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

示例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);
	state = bundle.getEnum( STATE, State.class );

	//in some states tengu won't be in the world, in others he will be.
	if (state == State.START || state == State.MAZE) {
		tengu = (Tengu)bundle.get( TENGU );
	} else {
		for (Mob mob : mobs){
			if (mob instanceof Tengu) {
				tengu = (Tengu) mob;
				break;
			}
		}
	}

	for (Bundlable item : bundle.getCollection(STORED_ITEMS)){
		storedItems.add( (Item)item );
	}
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:22,代码来源:PrisonBossLevel.java

示例6: restoreFromBundle

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

		backpack.clear();
		backpack.restoreFromBundle(bundle);

		weapon = (KindOfWeapon) bundle.get(WEAPON);
		if (weapon != null) {
			weapon.activate(owner);
		}

		armor = (Armor) bundle.get(ARMOR);
		if (armor != null) {
			armor.activate(owner);
		}

		misc1 = (KindofMisc) bundle.get(MISC1);
		if (misc1 != null) {
			misc1.activate(owner);
		}

		misc2 = (KindofMisc) bundle.get(MISC2);
		if (misc2 != null) {
			misc2.activate(owner);
		}

		misc3 = (KindofMisc) bundle.get(MISC3);
		if (misc3 != null) {
			misc3.activate(owner);
		}

		misc4 = (KindofMisc) bundle.get(MISC4);
		if (misc4 != null) {
			misc4.activate(owner);
		}
	}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:36,代码来源:Belongings.java

示例7: loadLevel

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static Level loadLevel( HeroClass cl ) throws IOException {
	
	Dungeon.level = null;
	Actor.clear();
	
	InputStream input = Game.instance.openFileInput( Utils.format( depthFile( cl ), depth ) ) ;
	Bundle bundle = Bundle.read( input );
	input.close();
	
	return (Level)bundle.get( "level" );
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:12,代码来源:Dungeon.java

示例8: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	super.restoreFromBundle( bundle );
	if ((hitsToKnow = bundle.getInt( UNFAMILIRIARITY )) == 0) {
		hitsToKnow = HITS_TO_KNOW;
	}
	enchantment = (Enchantment)bundle.get( ENCHANTMENT );
	imbue = bundle.getEnum( IMBUE, Imbue.class );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:10,代码来源:Weapon.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);
				reward = (Ring) node.get(REWARD);
			}
		}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:13,代码来源:Imp.java

示例10: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle(Bundle bundle) {
	super.restoreFromBundle(bundle);
	if ((hitsToKnow = bundle.getInt(UNFAMILIRIARITY)) == 0) {
		hitsToKnow = HITS_TO_KNOW;
	}
	enchantment = (Enchantment) bundle.get(ENCHANTMENT);
	imbue = bundle.getEnum(IMBUE, Imbue.class);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:10,代码来源:Weapon.java

示例11: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	super.restoreFromBundle( bundle );
	roomExit = (Room)bundle.get( ARENA );
	arenaDoor = bundle.getInt( DOOR );
	enteredArena = bundle.getBoolean( ENTERED );
	keyDropped = bundle.getBoolean( DROPPED );
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:9,代码来源:PrisonBossLevel.java

示例12: loadLevel

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public static Level loadLevel( HeroClass cl ) throws IOException {
	
	Dungeon.level = null;
	Actor.clear();
	
	InputStream input = Game.instance.openFileInput( Messages.format( depthFile( cl ), depth ) ) ;
	Bundle bundle = Bundle.read( input );
	input.close();
	
	return (Level)bundle.get( "level" );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:12,代码来源:Dungeon.java

示例13: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	super.restoreFromBundle(bundle);
	if ((hitsToKnow = bundle.getInt( UNFAMILIRIARITY )) == 0) {
		hitsToKnow = HITS_TO_KNOW;
	}
	inscribe((Glyph) bundle.get(GLYPH));
	seal = (BrokenSeal)bundle.get(SEAL);
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:10,代码来源:Armor.java

示例14: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle(Bundle bundle) {
	super.restoreFromBundle(bundle);
	wand = (Wand) bundle.get(WAND);
	if (wand != null) {
		wand.maxCharges = Math.min(wand.maxCharges + 1, 10);
		name = Messages.get(wand, "staff_name");
	}
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:10,代码来源:MagesStaff.java

示例15: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle(Bundle bundle) {
	super.restoreFromBundle(bundle);
	weapon = (Weapon) bundle.get(WEAPON);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:6,代码来源:Statue.java


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