本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas类的典型用法代码示例。如果您正苦于以下问题:Java StenchGas类的具体用法?Java StenchGas怎么用?Java StenchGas使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StenchGas类属于com.shatteredpixel.shatteredpixeldungeon.actors.blobs包,在下文中一共展示了StenchGas类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shatter
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas; //导入依赖的package包/类
@Override
protected void shatter( int cell ) {
PathFinder.buildDistanceMap( cell, BArray.not( Level.losBlocking, null ), DISTANCE );
boolean procd = false;
Blob[] blobs = {
Dungeon.level.blobs.get( ToxicGas.class ),
Dungeon.level.blobs.get( ParalyticGas.class ),
Dungeon.level.blobs.get( ConfusionGas.class ),
Dungeon.level.blobs.get( StenchGas.class )
};
for (int j=0; j < blobs.length; j++) {
Blob blob = blobs[j];
if (blob == null) {
continue;
}
for (int i=0; i < Level.LENGTH; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
int value = blob.cur[i];
if (value > 0) {
blob.cur[i] = 0;
blob.volume -= value;
procd = true;
CellEmitter.get( i ).burst( Speck.factory( Speck.DISCOVER ), 1 );
}
}
}
}
boolean heroAffected = PathFinder.distance[Dungeon.hero.pos] < Integer.MAX_VALUE;
if (procd) {
splash( cell );
Sample.INSTANCE.play( Assets.SND_SHATTER );
setKnown();
if (heroAffected) {
GLog.p( TXT_FRESHNESS );
}
} else {
super.shatter( cell );
if (heroAffected) {
GLog.i( TXT_FRESHNESS );
setKnown();
}
}
}
示例2: defenseProc
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas; //导入依赖的package包/类
@Override
public int defenseProc( Char enemy, int damage ) {
GameScene.add( Blob.seed( pos, 20, StenchGas.class ) );
return super.defenseProc(enemy, damage);
}
示例3: defenseProc
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas; //导入依赖的package包/类
@Override
public int defenseProc( Char enemy, int damage ) {
GameScene.add(Blob.seed(pos, 20, StenchGas.class));
return super.defenseProc(enemy, damage);
}