本文整理汇总了Java中com.watabou.utils.Callback.call方法的典型用法代码示例。如果您正苦于以下问题:Java Callback.call方法的具体用法?Java Callback.call怎么用?Java Callback.call使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.watabou.utils.Callback
的用法示例。
在下文中一共展示了Callback.call方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected void fx(Ballistica bolt, Callback callback) {
affected.clear();
arcs.clear();
arcs.add(new Lightning.Arc(bolt.sourcePos, bolt.collisionPos));
int cell = bolt.collisionPos;
Char ch = Actor.findChar(cell);
if (ch != null) {
arc(ch);
} else {
CellEmitter.center(cell).burst(SparkParticle.FACTORY, 3);
}
//don't want to wait for the effect before processing damage.
curUser.sprite.parent.add(new Lightning(arcs, null));
callback.call();
}
示例2: onComplete
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
public void onComplete( Animation anim ) {
if (animCallback != null) {
Callback executing = animCallback;
animCallback = null;
executing.call();
} else {
if (anim == attack) {
idle();
ch.onAttackComplete();
} else if (anim == operate) {
idle();
ch.onOperateComplete();
}
}
}
示例3: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected void fx( Ballistica bolt, Callback callback ) {
affected.clear();
arcs.clear();
arcs.add( new Lightning.Arc(bolt.sourcePos, bolt.collisionPos));
int cell = bolt.collisionPos;
Char ch = Actor.findChar( cell );
if (ch != null) {
arc(ch);
} else {
CellEmitter.center( cell ).burst( SparkParticle.FACTORY, 3 );
}
//don't want to wait for the effect before processing damage.
curUser.sprite.parent.add( new Lightning( arcs, null ) );
callback.call();
}
示例4: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
protected void fx(int cell, Callback callback) {
cell = Ballistica.trace[Math.min(Ballistica.distance, distance()) - 1];
curUser.sprite.parent.add(new Beam.DeathRay(curUser.sprite.center(),
DungeonTilemap.tileCenterToWorld(cell)));
callback.call();
}
示例5: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected void fx(Ballistica beam, Callback callback) {
int cell = beam.path.get(Math.min(beam.dist, distance()));
curUser.sprite.parent.add(new Beam.DeathRay(curUser.sprite.center(),
DungeonTilemap.tileCenterToWorld(cell)));
callback.call();
}
示例6: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected void fx( Ballistica beam, Callback callback ) {
int cell = beam.path.get(Math.min(beam.dist, distance()));
curUser.sprite.parent.add(new Beam.DeathRay(curUser.sprite.center(), DungeonTilemap.tileCenterToWorld( cell )));
callback.call();
}
示例7: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected void fx( int cell, Callback callback ) {
cell = Ballistica.trace[Math.min( Ballistica.distance, distance() ) - 1];
curUser.sprite.parent.add( new DeathRay( curUser.sprite.center(), DungeonTilemap.tileCenterToWorld( cell ) ) );
callback.call();
}
示例8: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected void fx(Ballistica beam, Callback callback) {
curUser.sprite.parent.add(
new Beam.HealthRay(curUser.sprite.center(), DungeonTilemap.tileCenterToWorld(beam.collisionPos)));
callback.call();
}
示例9: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected void fx(Ballistica beam, Callback callback) {
curUser.sprite.parent.add(
new Beam.LightRay(curUser.sprite.center(), DungeonTilemap.tileCenterToWorld(beam.collisionPos)));
callback.call();
}
示例10: fx
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected void fx( Ballistica beam, Callback callback ) {
curUser.sprite.parent.add(
new Beam.LightRay(curUser.sprite.center(), DungeonTilemap.tileCenterToWorld(beam.collisionPos)));
callback.call();
}
示例11: doAttack
import com.watabou.utils.Callback; //导入方法依赖的package包/类
@Override
protected boolean doAttack( final Char enemy ) {
if (pumpedUp) {
if (Level.adjacent( pos, enemy.pos )) {
// Pumped up attack WITHOUT accuracy penalty
jumped = false;
return super.doAttack( enemy );
} else {
// Pumped up attack WITH accuracy penalty
jumped = true;
if (Ballistica.cast( pos, enemy.pos, false, true ) == enemy.pos) {
final int dest = Ballistica.trace[Ballistica.distance - 2];
Callback afterJump = new Callback() {
@Override
public void call() {
move( dest );
Dungeon.level.mobPress( Goo.this );
Goo.super.doAttack( enemy );
}
};
if (Dungeon.visible[pos] || Dungeon.visible[dest]) {
sprite.jump( pos, dest, afterJump );
return false;
} else {
afterJump.call();
return true;
}
} else {
sprite.idle();
pumpedUp = false;
return true;
}
}
} else if (Random.Int( 3 ) > 0) {
// Normal attack
return super.doAttack( enemy );
} else {
// Pumping up
pumpedUp = true;
spend( PUMP_UP_DELAY );
((GooSprite)sprite).pumpUp();
if (Dungeon.visible[pos]) {
sprite.showStatus( CharSprite.NEGATIVE, "!!!" );
GLog.n( "Goo is pumping itself up!" );
}
return true;
}
}