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


Java Bundle.getBooleanArray方法代码示例

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


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

示例1: restorePlaceholders

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public void restorePlaceholders(Bundle bundle) {
	Collection<Bundlable> placeholders = bundle.getCollection(PLACEHOLDERS);
	boolean[] placements = bundle.getBooleanArray(PLACEMENTS);

	int i = 0;
	for (Bundlable item : placeholders) {
		while (!placements[i])
			i++;
		setSlot(i, (Item) item);
		i++;
	}

}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:14,代码来源:QuickSlot.java

示例2: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle(Bundle bundle) {
	super.restoreFromBundle(bundle);
	returnDepth = bundle.getInt(DEPTH);
	returnPos = bundle.getInt(POS);
	rooms = bundle.getBooleanArray(ROOMS);
	firsts = bundle.getBooleanArray(FIRSTS);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:9,代码来源:OtilukesJournal.java

示例3: restorePlaceholders

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
public void restorePlaceholders(Bundle bundle){
	Collection<Bundlable> placeholders = bundle.getCollection(PLACEHOLDERS);
	boolean[] placements = bundle.getBooleanArray( PLACEMENTS );

	int i = 0;
	for (Bundlable item : placeholders){
		while (!placements[i]) i++;
		setSlot( i, (Item)item );
		i++;
	}

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

示例4: restoreFromBundle

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

	if (bundle.contains("width") && bundle.contains("height")) {
		setSize(bundle.getInt("width"), bundle.getInt("height"));
	} else
		setSize(32, 32);

	mobs = new HashSet<Mob>();
	heaps = new SparseArray<Heap>();
	blobs = new HashMap<Class<? extends Blob>, Blob>();
	plants = new SparseArray<Plant>();

	map = bundle.getIntArray(MAP);
	visited = bundle.getBooleanArray(VISITED);
	mapped = bundle.getBooleanArray(MAPPED);

	entrance = bundle.getInt(ENTRANCE);
	exit = bundle.getInt(EXIT);
	currentmoves = bundle.getInt(MOVES);

	locked = bundle.getBoolean(LOCKED);

	cleared = bundle.getBoolean(CLEARED);
	reset = bundle.getBoolean(RESET);
	forcedone = bundle.getBoolean(FORCEDONE);
	genpetnext = bundle.getBoolean(GENPETNEXT);
	sealedlevel = bundle.getBoolean(SEALEDLEVEL);
	viewDistance = bundle.getInt(VIEW);

	weakFloorCreated = false;

	Collection<Bundlable> collection = bundle.getCollection(HEAPS);
	for (Bundlable h : collection) {
		Heap heap = (Heap) h;
		if (!heap.isEmpty())
			heaps.put(heap.pos, heap);
	}

	collection = bundle.getCollection(PLANTS);
	for (Bundlable p : collection) {
		Plant plant = (Plant) p;
		plants.put(plant.pos, plant);
	}

	collection = bundle.getCollection(MOBS);
	for (Bundlable m : collection) {
		Mob mob = (Mob) m;
		if (mob != null) {
			mobs.add(mob);
		}
	}

	collection = bundle.getCollection(BLOBS);
	for (Bundlable b : collection) {
		Blob blob = (Blob) b;
		blobs.put(blob.getClass(), blob);
	}

	feeling = bundle.getEnum(FEELING, Feeling.class);
	if (feeling == Feeling.DARK)
		viewDistance = (int) Math.ceil(viewDistance / 3f);

	buildFlagMaps();
	cleanWalls();
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:67,代码来源:Level.java

示例5: restoreFromBundle

import com.watabou.utils.Bundle; //导入方法依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	
	mobs = new HashSet<Mob>();
	heaps = new SparseArray<Heap>();
	blobs = new HashMap<Class<? extends Blob>, Blob>();
	plants = new SparseArray<Plant>();
	
	map		= bundle.getIntArray( MAP );
	visited	= bundle.getBooleanArray( VISITED );
	mapped	= bundle.getBooleanArray( MAPPED );
	
	entrance	= bundle.getInt( ENTRANCE );
	exit		= bundle.getInt( EXIT );
	
	weakFloorCreated = false;
	
	adjustMapSize();
	
	Collection<Bundlable> collection = bundle.getCollection( HEAPS );
	for (Bundlable h : collection) {
		Heap heap = (Heap)h;
		if (resizingNeeded) {
			heap.pos = adjustPos( heap.pos );
		}
		heaps.put( heap.pos, heap );
	}
	
	collection = bundle.getCollection( PLANTS );
	for (Bundlable p : collection) {
		Plant plant = (Plant)p;
		if (resizingNeeded) {
			plant.pos = adjustPos( plant.pos );
		}
		plants.put( plant.pos, plant );
	}
	
	collection = bundle.getCollection( MOBS );
	for (Bundlable m : collection) {
		Mob mob = (Mob)m;
		if (mob != null) {
			if (resizingNeeded) {
				mob.pos = adjustPos( mob.pos );
			}
			mobs.add( mob );
		}
	}
	
	collection = bundle.getCollection( BLOBS );
	for (Bundlable b : collection) {
		Blob blob = (Blob)b;
		blobs.put( blob.getClass(), blob );
	}
	
	buildFlagMaps();
	cleanWalls();
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:58,代码来源:Level.java


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