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


Java PosTweener类代码示例

本文整理汇总了Java中com.watabou.noosa.tweeners.PosTweener的典型用法代码示例。如果您正苦于以下问题:Java PosTweener类的具体用法?Java PosTweener怎么用?Java PosTweener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PosTweener类属于com.watabou.noosa.tweeners包,在下文中一共展示了PosTweener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move( int from, int to ) {
	play( run );
	
	motion = new PosTweener( this, worldToCamera( to ), MOVE_INTERVAL );
	motion.listener = this;
	parent.add( motion );

	isMoving = true;
	
	turnTo( from , to );
	
	if (visible && Level.water[from] && !ch.flying) {
		GameScene.ripple( from );
	}
	
	ch.onMotionComplete();
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:18,代码来源:CharSprite.java

示例2: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move( int from, int to ) {
		play( run );
		
		motion = new PosTweener( this, worldToCamera( to ), MOVE_INTERVAL );
		motion.listener = this;
		parent.add( motion );

		isMoving = true;
		
		turnTo( from , to );
		
//		if (visible && Level.water[from] && !ch.flying) {
//			GameScene.ripple(from);
//		}
		
		ch.onMotionComplete();
	}
 
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:18,代码来源:CharSprite.java

示例3: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move( int from, int to ) {
	play( run );
	
	motion = new PosTweener( this, worldToCamera( to ), MOVE_INTERVAL );
	motion.listener = this;
	parent.add( motion );

       isMoving = true;
	
	turnTo( from , to );
	
	if (visible && Level.water[from] && !ch.flying) {
		GameScene.ripple( from );
	}

       ch.onMotionComplete();
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:18,代码来源:CharSprite.java

示例4: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move( int from, int to ) {
	play( run );
	
	motion = new PosTweener( this, worldToCamera( to ), MOVE_INTERVAL );
	motion.listener = this;
	parent.add( motion );

	isMoving = true;
	
	turnTo( from , to );
	
	if (visible && Level.water[from] && !ch.flying) {
		GameScene.ripple( from );
	}

	ch.onMotionComplete();
}
 
开发者ID:Sarius997,项目名称:Multiplayer-PD,代码行数:18,代码来源:CharSprite.java

示例5: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move(int from, int to) {
	play(run);

	if (getParent() != null) {
		motion = new PosTweener(this, worldToCamera(to), MOVE_INTERVAL);
		motion.listener = this;
		getParent().add(motion);

		isMoving = true;

		turnTo(from, to);

		if (getVisible() && Dungeon.level.water[from] && !ch.isFlying()) {
			GameScene.ripple(from);
		}
	}
	ch.onMotionComplete();
}
 
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:19,代码来源:CharSprite.java

示例6: reset

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void reset(int from, int to, int image, Glowing glowing,
                  Callback listener) {
	revive();

	view(image, glowing);

	this.callback = listener;

	point(DungeonTilemap.tileToWorld(from));
	PointF dest = DungeonTilemap.tileToWorld(to);

	PointF d = PointF.diff(dest, point());
	speed.set(d).normalize().scale(SPEED);

	if (image == ItemSpriteSheet.DART
			|| image == ItemSpriteSheet.INCENDIARY_DART
			|| image == ItemSpriteSheet.CURARE_DART
			|| image == ItemSpriteSheet.JAVELIN) {

		angularSpeed = 0;
		angle = 135 - (float) (Math.atan2(d.x, d.y) / 3.1415926 * 180);

	} else if (image == ItemSpriteSheet.WAVE
			|| image == ItemSpriteSheet.SKULLWEP) {

		angularSpeed = 0;
		angle = 90 - (float) (Math.atan2(d.x, d.y) / 3.1415926 * 180);

	} else {

		angularSpeed = image == 15 || image == 106 ? 1440 : 720;

	}

	PosTweener tweener = new PosTweener(this, dest, d.length() / SPEED);
	tweener.listener = this;
	parent.add(tweener);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:39,代码来源:MissileSprite.java

示例7: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move(int from, int to) {
	if (getParent() != null) {
		Tweener motion = new PosTweener(this, DungeonTilemap.tileToWorld(to).offset(centerShift), 0.1f);
		motion.listener = this;
		getParent().add(motion);

		if (getVisible() && Dungeon.level.water[from]) {
			GameScene.ripple(from);
		}
	}
}
 
开发者ID:NYRDS,项目名称:pixel-dungeon-remix,代码行数:12,代码来源:LevelObjectSprite.java

示例8: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move(int from, int to) {

		turnTo(from, to);

		play(run);

		motion = new PosTweener(this, worldToCamera(to), MOVE_INTERVAL);
		motion.listener = this;
		parent.add(motion);

		isMoving = true;

		if (visible && Level.water[from] && !ch.flying) {
			GameScene.ripple(from);
		}
	}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:17,代码来源:CharSprite.java

示例9: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move( int from, int to ) {
	turnTo( from , to );

	play( run );
	
	motion = new PosTweener( this, worldToCamera( to ), MOVE_INTERVAL );
	motion.listener = this;
	parent.add( motion );

	isMoving = true;
	
	if (visible && Level.water[from] && !ch.flying) {
		GameScene.ripple( from );
	}

}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:17,代码来源:CharSprite.java

示例10: reset

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void reset( int from, int to, int image, float speed_modifier, Glowing glowing, Callback listener ) {
		revive();
		
		view( image, glowing );
		
		this.callback = listener;

		point( DungeonTilemap.tileToWorld( from ) );
		PointF dest = DungeonTilemap.tileToWorld( to );
		
		PointF d = PointF.diff( dest, point() );

		speed.set( d ).normalize().scale( SPEED * speed_modifier );

        scale.x = 0.8f;
        scale.y = 0.8f;

        // FIXME

		if (
            image == ItemSpriteSheet.THROWING_DART
            || image == ItemSpriteSheet.THROWING_KNIFE
            || image == ItemSpriteSheet.JAVELIN
//            || image == ItemSpriteSheet.HARPOON
            || image == ItemSpriteSheet.HARPOON_THROWN
            || image == ItemSpriteSheet.HARPOON_RETURN
            || image == ItemSpriteSheet.ARROW
            || image == ItemSpriteSheet.QUARREL
        ) {

			angularSpeed = 0;
			angle = ( image != ItemSpriteSheet.HARPOON_RETURN ? 135 : -45 ) - (float)(Math.atan2( d.x, d.y ) / 3.1415926 * 180);
			
		} else {
			
			angularSpeed = 720;
			
		}
		
		PosTweener tweener = new PosTweener( this, dest, d.length() / SPEED );
		tweener.listener = this;
		parent.add( tweener );
	}
 
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:44,代码来源:MissileSprite.java

示例11: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move( int from, int to ) {
	turnTo(from, to);

	play( run );
	
	motion = new PosTweener( this, worldToCamera( to ), MOVE_INTERVAL );
	motion.listener = this;
	parent.add( motion );

	isMoving = true;
	
	turnTo( from , to );
	
	if (visible && Level.water[from] && !ch.flying) {
		GameScene.ripple( from );
	}

	ch.onMotionComplete();
}
 
开发者ID:FthrNature,项目名称:unleashed-pixel-dungeon,代码行数:20,代码来源:CharSprite.java

示例12: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move( int from, int to ) {
	turnTo( from , to );

	play( run );
	
	motion = new PosTweener( this, worldToCamera( to ), MOVE_INTERVAL );
	motion.listener = this;
	parent.add( motion );

	isMoving = true;
	
	if (visible && Dungeon.level.water[from] && !ch.flying) {
		GameScene.ripple( from );
	}

}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:17,代码来源:CharSprite.java

示例13: move

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void move( int from, int to ) {
	turnTo( from , to );

	play( run );
	
	motion = new PosTweener( this, worldToCamera( to ), moveInterval);
	motion.listener = this;
	parent.add( motion );

	isMoving = true;
	
	if (visible && Dungeon.level.water[from] && !ch.flying) {
		GameScene.ripple( from );
	}

}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon-gdx,代码行数:17,代码来源:CharSprite.java

示例14: reset

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void reset( int from, int to, int image, Glowing glowing, Callback listener ) {
	revive();
	
	view( image, glowing );
	
	this.callback = listener;

	point( DungeonTilemap.tileToWorld( from ) );
	PointF dest = DungeonTilemap.tileToWorld( to );
	
	PointF d = PointF.diff( dest, point() );
	speed.set( d ).normalize().scale( SPEED );

	if (image == ItemSpriteSheet.DART || image == ItemSpriteSheet.INCENDIARY_DART
			|| image == ItemSpriteSheet.CURARE_DART  || image == ItemSpriteSheet.JAVELIN) {

		angularSpeed = 0;
		angle = 135 - (float)(Math.atan2( d.x, d.y ) / 3.1415926 * 180);

	} else {

		angularSpeed = image == 15 || image == 106 ? 1440 : 720;

	}
	
	PosTweener tweener = new PosTweener( this, dest, d.length() / SPEED );
	tweener.listener = this;
	parent.add( tweener );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:30,代码来源:MissileSprite.java

示例15: reset

import com.watabou.noosa.tweeners.PosTweener; //导入依赖的package包/类
public void reset( int from, int to, int image, Glowing glowing, Callback listener ) {
	revive();
	
	view( image, glowing );
	
	this.callback = listener;

	point( DungeonTilemap.tileToWorld( from ) );
	PointF dest = DungeonTilemap.tileToWorld( to );
	
	PointF d = PointF.diff( dest, point() ); 
	speed.set( d ).normalize().scale( SPEED );
	
	if (image == 31 || image == 108 || image == 109 || image == 110) {

		angularSpeed = 0;
		angle = 135 - (float)(Math.atan2( d.x, d.y ) / 3.1415926 * 180);
		
	} else {
		
		angularSpeed = image == 15 || image == 106 ? 1440 : 720;
		
	}
	
	PosTweener tweener = new PosTweener( this, dest, d.length() / SPEED );
	tweener.listener = this;
	parent.add( tweener );
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:29,代码来源:MissileSprite.java


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