本文整理汇总了Java中com.watabou.noosa.tweeners.ScaleTweener类的典型用法代码示例。如果您正苦于以下问题:Java ScaleTweener类的具体用法?Java ScaleTweener怎么用?Java ScaleTweener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ScaleTweener类属于com.watabou.noosa.tweeners包,在下文中一共展示了ScaleTweener类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fall
import com.watabou.noosa.tweeners.ScaleTweener; //导入依赖的package包/类
public void fall() {
origin.set(width / 2, height - DungeonTilemap.SIZE / 2);
angularSpeed = Random.Int(2) == 0 ? -720 : 720;
parent.add(new ScaleTweener(this, new PointF(0, 0), FALL_TIME) {
@Override
protected void onComplete() {
MobSprite.this.killAndErase();
parent.erase(this);
}
@Override
protected void updateValues(float progress) {
super.updateValues(progress);
am = 1 - progress;
}
});
}
示例2: fall
import com.watabou.noosa.tweeners.ScaleTweener; //导入依赖的package包/类
public void fall() {
origin.set( width / 2, height - DungeonTilemap.SIZE / 2 );
angularSpeed = Random.Int( 2 ) == 0 ? -720 : 720;
parent.add( new ScaleTweener( this, new PointF( 0, 0 ), FALL_TIME ) {
@Override
protected void onComplete() {
MobSprite.this.killAndErase();
parent.erase( this );
};
@Override
protected void updateValues( float progress ) {
super.updateValues( progress );
am = 1 - progress;
}
} );
}
示例3: growPlant
import com.watabou.noosa.tweeners.ScaleTweener; //导入依赖的package包/类
public void growPlant( final int pos ){
final Image plant = tile( pos, map[pos] );
plant.origin.set( 8, 12 );
plant.scale.set( 0 );
plant.point( DungeonTilemap.tileToWorld( pos ) );
parent.add( plant );
parent.add( new ScaleTweener( plant, new PointF(1, 1), 0.2f ) {
protected void onComplete() {
plant.killAndErase();
killAndErase();
updateMapCell(pos);
}
} );
}
示例4: fall
import com.watabou.noosa.tweeners.ScaleTweener; //导入依赖的package包/类
public void fall() {
origin.set( width / 2, height - DungeonTilemap.SIZE / 2 );
angularSpeed = Random.Int( 2 ) == 0 ? -720 : 720;
parent.add(new ScaleTweener(this, new PointF(0, 0), FALL_TIME) {
@Override
protected void onComplete() {
MobSprite.this.killAndErase();
parent.erase(this);
}
;
@Override
protected void updateValues(float progress) {
super.updateValues(progress);
am = 1 - progress;
}
});
}
示例5: growPlant
import com.watabou.noosa.tweeners.ScaleTweener; //导入依赖的package包/类
public void growPlant( final int pos ){
final Image plant = tile( pos, map[pos] );
if (plant == null) return;
plant.origin.set( 8, 12 );
plant.scale.set( 0 );
plant.point( DungeonTilemap.tileToWorld( pos ) );
parent.add( plant );
parent.add( new ScaleTweener( plant, new PointF(1, 1), 0.2f ) {
protected void onComplete() {
plant.killAndErase();
killAndErase();
updateMapCell(pos);
}
} );
}
示例6: fall
import com.watabou.noosa.tweeners.ScaleTweener; //导入依赖的package包/类
public void fall() {
origin.set( width / 2, height - DungeonTilemap.SIZE / 2 );
angularSpeed = Random.Int( 2 ) == 0 ? -720 : 720;
getParent().add( new ScaleTweener( this, new PointF( 0, 0 ), 1f ) {
@Override
protected void onComplete() {
LevelObjectSprite.this.killAndErase();
}
@Override
protected void updateValues( float progress ) {
super.updateValues( progress );
am = 1 - progress;
}
} );
}
示例7: fall
import com.watabou.noosa.tweeners.ScaleTweener; //导入依赖的package包/类
public void fall() {
origin.set( width / 2, height - DungeonTilemap.SIZE / 2 );
angularSpeed = Random.Int( 2 ) == 0 ? -720 : 720;
getParent().add( new ScaleTweener( this, new PointF( 0, 0 ), FALL_TIME ) {
@Override
protected void onComplete() {
MobSprite.this.killAndErase();
}
@Override
protected void updateValues( float progress ) {
super.updateValues( progress );
am = 1 - progress;
}
} );
}