当前位置: 首页>>代码示例>>Java>>正文


Java Callback.call方法代码示例

本文整理汇总了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();
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:21,代码来源:WandOfLightning.java

示例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();
			
		}
		
	}
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:24,代码来源:CharSprite.java

示例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();
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:21,代码来源:WandOfLightning.java

示例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();
	}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:8,代码来源:RingOfDisintegration.java

示例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();
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:9,代码来源:WandOfDisintegration2.java

示例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();
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:8,代码来源:WandOfDisintegration.java

示例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();
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:8,代码来源:WandOfDisintegration.java

示例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();
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:7,代码来源:WandOfTransfusion.java

示例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();
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:7,代码来源:WandOfPrismaticLight.java

示例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();
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:7,代码来源:WandOfPrismaticLight.java

示例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;
	}
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:67,代码来源:Goo.java


注:本文中的com.watabou.utils.Callback.call方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。