本文整理汇总了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);
}
}
}
示例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);
}
}
}
示例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 );
}
}
}
示例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 );
}
}
示例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++;
}
}
示例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);
}
}
示例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++;
}
}
示例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 );
};
}
示例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 );
}
}
}
示例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 );
};
}
示例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 );
}
}
}
示例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 );
};
}
示例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 );
}
}
示例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++;
}
}