本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
}
}
示例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);
}
}
示例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 );
}
}
示例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 );
}
示例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();
}
示例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 );
}
}
示例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 );
}
}
示例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 );
}
示例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 );
}