public ShaftParticle() { super(); lifespan = 1.2f; speed.set( 0, -6 ); }
public void update( MotionEvent e, int index ) { float x = e.getX( index ); float y = e.getY( index ); x /= (Game.dispWidth / (float)Game.width); y /= (Game.dispHeight / (float)Game.height); current.set( x, y ); }
public void reset( float x, float y ) { revive(); this.x = x; this.y = y; left = lifespan; speed.set( 0, -40 ); size = 4; }
public void reset( float x, float y ) { revive(); this.x = x; this.y = y - 4; left = lifespan; size = 4; speed.set( 0 ); }
public FlowParticle() { super(); lifespan = 0.6f; acc.set( 0, 32 ); angularSpeed = Random.Float( -360, +360 ); }
public static RenderedText renderText( String text, int size ) { RenderedText result = new RenderedText( text, size*defaultZoom); result.scale.set(1/(float)defaultZoom); return result; }
public ElmoParticle() { super(); color( 0x22EE66 ); lifespan = 0.6f; acc.set( 0, -80 ); }
@Override public void update() { if ((alpha -= Game.elapsed) > 0) { alpha( alpha ); scale.set( DungeonTilemap.SIZE * alpha ); } else { killAndErase(); } } }
public EarthParticle() { super(); lifespan = 0.5f; color( ColorMath.random( 0x555555, 0x777766 ) ); acc.set( 0, +40 ); }
public BusyIndicator() { super(); copy( Icons.BUSY.get() ); origin.set( width / 2, height / 2 ); angularSpeed = 720; }
public Wound() { super( Effects.get( Effects.Type.WOUND ) ); hardlight(1f, 0f, 0f); origin.set( width / 2, height / 2 ); }
public void reset( float x, float y ) { revive(); this.x = x; this.y = y; left = lifespan; size = 4; speed.set( Random.Float( -10, +10 ), Random.Float( -10, +10 ) ); } }
@Override public void update() { super.update(); float p = timeLeft / duration; alpha( p ); scale.set( scale.x, p ); if ((timeLeft -= Game.elapsed) <= 0) { killAndErase(); } }
public Compass( int cell ) { super(); copy( Icons.COMPASS.get() ); origin.set( width / 2, RADIUS ); this.cell = cell; cellCenter = DungeonTilemap.tileCenterToWorld( cell ); visible = false; }
public void reset( float x, float y ) { revive(); this.x = x; this.y = y; speed.set( Random.Float( -5, +5 ), Random.Float( -5, +5 ) ); left = lifespan; }
public void reset( float x, float y ) { revive(); left = lifespan; super.speed.set( WindParticle.speed ); super.speed.scale( size ); this.x = x - super.speed.x * lifespan / 2; this.y = y - super.speed.y * lifespan / 2; angle += Random.Float( -0.1f, +0.1f ); speed = new PointF().polar( angle, 5 ); am = 0; }
@Override public void staffFx(MagesStaff.StaffParticle particle) { particle.color(0x88CCFF); particle.am = 0.6f; particle.setLifespan(2f); float angle = Random.Float(PointF.PI2); particle.speed.polar( angle, 2f); particle.acc.set( 0f, 1f); particle.setSize( 0f, 1.5f); particle.radiateXY(Random.Float(1f)); }