本文整理匯總了Java中com.shatteredpixel.shatteredpixeldungeon.actors.blobs.GooWarn類的典型用法代碼示例。如果您正苦於以下問題:Java GooWarn類的具體用法?Java GooWarn怎麽用?Java GooWarn使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
GooWarn類屬於com.shatteredpixel.shatteredpixeldungeon.actors.blobs包,在下文中一共展示了GooWarn類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doAttack
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.GooWarn; //導入依賴的package包/類
@Override
protected boolean doAttack( Char enemy ) {
if (pumpedUp == 1) {
((GooSprite)sprite).pumpUp();
PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.solid, null ), 2 );
for (int i = 0; i < PathFinder.distance.length; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE)
GameScene.add(Blob.seed(i, 2, GooWarn.class));
}
pumpedUp++;
spend( attackDelay() );
return true;
} else if (pumpedUp >= 2 || Random.Int( (HP*2 <= HT) ? 2 : 5 ) > 0) {
boolean visible = Dungeon.level.heroFOV[pos];
if (visible) {
if (pumpedUp >= 2) {
((GooSprite) sprite).pumpAttack();
}
else
sprite.attack( enemy.pos );
} else {
attack( enemy );
}
spend( attackDelay() );
return !visible;
} else {
pumpedUp++;
((GooSprite)sprite).pumpUp();
for (int i=0; i < PathFinder.NEIGHBOURS9.length; i++) {
int j = pos + PathFinder.NEIGHBOURS9[i];
if (!Dungeon.level.solid[j]) {
GameScene.add(Blob.seed(j, 2, GooWarn.class));
}
}
if (Dungeon.level.heroFOV[pos]) {
sprite.showStatus( CharSprite.NEGATIVE, Messages.get(this, "!!!") );
GLog.n( Messages.get(this, "pumpup") );
}
spend( attackDelay() );
return true;
}
}