本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle类的典型用法代码示例。如果您正苦于以下问题:Java SnowParticle类的具体用法?Java SnowParticle怎么用?Java SnowParticle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SnowParticle类属于com.shatteredpixel.shatteredpixeldungeon.effects.particles包,在下文中一共展示了SnowParticle类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: affect
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle; //导入依赖的package包/类
public static void affect( int cell, Fire fire ) {
Char ch = Actor.findChar( cell );
if (ch != null) {
if (Level.water[ch.pos]){
Buff.prolong(ch, Frost.class, Frost.duration(ch) * Random.Float(5f, 7.5f));
} else {
Buff.prolong(ch, Frost.class, Frost.duration(ch) * Random.Float(1.0f, 1.5f));
}
}
if (fire != null) {
fire.clear( cell );
}
Heap heap = Dungeon.level.heaps.get( cell );
if (heap != null) {
heap.freeze();
}
if (Dungeon.visible[cell]) {
CellEmitter.get( cell ).start( SnowParticle.FACTORY, 0.2f, 6 );
}
}
示例2: proc
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle; //导入依赖的package包/类
@Override
public int proc( Armor armor, Char attacker, Char defender, int damage) {
if (Random.Int( 8 ) == 0) {
if (Dungeon.level.adjacent( attacker.pos, defender.pos )) {
Buff.prolong(attacker, Frost.class, Frost.duration(attacker) * Random.Float(0.5f, 1f));
CellEmitter.get(attacker.pos).start(SnowParticle.FACTORY, 0.2f, 6);
}
Buff.affect( defender, Burning.class ).reignite( defender );
defender.sprite.emitter().burst( FlameParticle.FACTORY, 5 );
}
return damage;
}
示例3: affect
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle; //导入依赖的package包/类
public static boolean affect( int cell, Fire fire ) {
Char ch = Actor.findChar( cell );
if (ch != null) {
if (Dungeon.level.water[ch.pos]){
Buff.prolong(ch, Frost.class, Frost.duration(ch) * Random.Float(5f, 7.5f));
} else {
Buff.prolong(ch, Frost.class, Frost.duration(ch) * Random.Float(1.0f, 1.5f));
}
}
if (fire != null) {
fire.clear( cell );
}
Heap heap = Dungeon.level.heaps.get( cell );
if (heap != null) {
heap.freeze();
}
if (Dungeon.level.heroFOV[cell]) {
CellEmitter.get( cell ).start( SnowParticle.FACTORY, 0.2f, 6 );
return true;
} else {
return false;
}
}
示例4: proc
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle; //导入依赖的package包/类
@Override
public int proc( Armor armor, Char attacker, Char defender, int damage) {
int level = Math.max( 0, armor.level );
if (Level.adjacent( attacker.pos, defender.pos ) && Random.Int( level + 6 ) >= 5) {
Buff.prolong( attacker, Frost.class, Frost.duration( attacker ) * Random.Float( 1f, 1.5f ));
CellEmitter.get( attacker.pos ).start( SnowParticle.FACTORY, 0.2f, 6 );
Buff.affect( defender, Burning.class ).reignite( defender );
defender.sprite.emitter().burst( FlameParticle.FACTORY, 5 );
}
return damage;
}
示例5: use
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle; //导入依赖的package包/类
@Override
public void use( BlobEmitter emitter ) {
super.use( emitter );
emitter.start( SnowParticle.FACTORY, 0.05f, 0 );
}