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


Java Bundlable类代码示例

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


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

示例1: restoreFromBundle

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

	super.restoreFromBundle(bundle);

	pos = bundle.getInt(POS);
	HP = bundle.getInt(TAG_HP);
	HT = bundle.getInt(TAG_HT);
	SHLD = bundle.getInt(TAG_SHLD);

	for (Bundlable b : bundle.getCollection(BUFFS)) {
		if (b != null) {
			((Buff) b).attachTo(this);
		}
	}
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:17,代码来源:Char.java

示例2: restoreFromBundle

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

	super.restoreFromBundle(bundle);

	heapgenspots = bundle.getIntArray(HEAPGENSPOTS);
	teleportspots = bundle.getIntArray(TELEPORTSPOTS);
	portswitchspots = bundle.getIntArray(PORTSWITCHSPOTS);
	destinationspots = bundle.getIntArray(DESTINATIONSPOTS);
	destinationassign = bundle.getIntArray(DESTINATIONASSIGN);
	teleportassign = bundle.getIntArray(TELEPORTASSIGN);
	prizeNo = bundle.getInt(PRIZENO);

	heapstogen = new HashSet<Item>();

	Collection<Bundlable> collectionheap = bundle.getCollection(HEAPSTOGEN);
	for (Bundlable i : collectionheap) {
		Item item = (Item) i;
		if (item != null) {
			heapstogen.add(item);
		}
	}
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:24,代码来源:DragonCaveLevel.java

示例3: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	
	super.restoreFromBundle( bundle );
	
	pos = bundle.getInt( POS );
	HP = bundle.getInt( TAG_HP );
	HT = bundle.getInt( TAG_HT );
	SHLD = bundle.getInt( TAG_SHLD );
	
	for (Bundlable b : bundle.getCollection( BUFFS )) {
		if (b != null) {
			((Buff)b).attachTo( this );
		}
	}
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:17,代码来源:Char.java

示例4: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的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

示例5: restorePlaceholders

import com.watabou.utils.Bundlable; //导入依赖的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

示例6: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的package包/类
@Override
public void restoreFromBundle(Bundle bundle) {
	super.restoreFromBundle(bundle);
	for (Bundlable item : bundle.getCollection(ITEMS)) {
		if (item != null)
			((Item) item).collect(this);
	}
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:9,代码来源:Bag.java

示例7: restorePlaceholders

import com.watabou.utils.Bundlable; //导入依赖的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

示例8: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	super.restoreFromBundle( bundle );
	for (Bundlable item : bundle.getCollection( ITEMS )) {
		if (item != null) ((Item)item).collect( this );
	};
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:8,代码来源:Bag.java

示例9: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	
	super.restoreFromBundle( bundle );
	
	pos = bundle.getInt( POS );
	HP = bundle.getInt( TAG_HP );
	HT = bundle.getInt( TAG_HT );
	
	for (Bundlable b : bundle.getCollection( BUFFS )) {
		if (b != null) {
			((Buff)b).attachTo( this );
		}
	}
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:16,代码来源:Char.java

示例10: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	super.restoreFromBundle( bundle );
	for (Bundlable item : bundle.getCollection( ITEMS )) {
		((Item)item).collect( this );
	};
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:8,代码来源:Bag.java

示例11: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	
	super.restoreFromBundle( bundle );
	
	pos = bundle.getInt( POS );
	HP = bundle.getInt( TAG_HP );
	HT = bundle.getInt( TAG_HT );

	for (Bundlable b : bundle.getCollection( BUFFS )) {
		if (b != null) {
			((Buff)b).attachTo( this );
		}
	}
}
 
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:16,代码来源:Char.java

示例12: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	super.restoreFromBundle( bundle );
	for (Bundlable item : bundle.getCollection( ITEMS )) {
           if( item != null)
            ((Item)item).collect( this );
	};
}
 
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:9,代码来源:Bag.java

示例13: restoreFromBundle

import com.watabou.utils.Bundlable; //导入依赖的package包/类
@Override
public void restoreFromBundle( Bundle bundle ) {
	super.restoreFromBundle( bundle );
	for (Bundlable item : bundle.getCollection( ITEMS )) {
		if (item != null) ((Item)item).collect( this );
	}
}
 
开发者ID:FthrNature,项目名称:unleashed-pixel-dungeon,代码行数:8,代码来源:Bag.java

示例14: restorePlaceholders

import com.watabou.utils.Bundlable; //导入依赖的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:wolispace,项目名称:soft-pixel-dungeon,代码行数:13,代码来源:QuickSlot.java


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