public static IceBlock freeze( CharSprite sprite ) { IceBlock iceBlock = new IceBlock( sprite ); if (sprite.parent != null) sprite.parent.add( iceBlock ); return iceBlock; } }
public CircleArc show(Group parent, PointF pos, float duration ) { point( pos ); parent.add( this ); lifespan = this.duration = duration; return this; }
private void addBlobSprite( final Blob gas ) { if (gas.emitter == null) { gases.add( new BlobEmitter( gas ) ); } }
@Override protected void onClick() { parent.add( new WndSettings() ); } }
public static void show( Char ch, Item item ) { if (!ch.sprite.visible) { return; } Enchanting sprite = new Enchanting( item ); sprite.target = ch; ch.sprite.parent.add( sprite ); } }
public static DarkBlock darken( CharSprite sprite ) { DarkBlock darkBlock = new DarkBlock( sprite ); if (sprite.parent != null) sprite.parent.add( darkBlock ); return darkBlock; }
public Flare show( Group parent, PointF pos, float duration ) { point( pos ); parent.add( this ); lifespan = this.duration = duration; if (lifespan > 0) scale.set( 0 ); return this; }
public static void addHallsVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WATER) { group.add( new Stream( i ) ); } } }
private void addMobSprite( Mob mob ) { CharSprite sprite = mob.sprite(); sprite.visible = Dungeon.level.heroFOV[mob.pos]; mobs.add( sprite ); sprite.link( mob ); }
public static void addCavesVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Vein( i ) ); } } }
public static void addSewerVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Sink( i ) ); } } }
public static void addPrisonVisuals(Level level, Group group){ for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Torch( i ) ); } } }
public void zap( int pos ) { parent.add( new Lightning( ch.pos, pos, (Shaman)ch ) ); turnTo( ch.pos, pos ); play( zap ); } }
private void addHeapSprite( Heap heap ) { ItemSprite sprite = heap.sprite = (ItemSprite)heaps.recycle( ItemSprite.class ); sprite.revive(); sprite.link( heap ); heaps.add( sprite ); }
@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.raisedTileCenterToWorld( cell ))); callback.call(); }
@Override protected void fx(Ballistica beam, Callback callback) { curUser.sprite.parent.add( new Beam.HealthRay(curUser.sprite.center(), DungeonTilemap.raisedTileCenterToWorld(beam.collisionPos))); callback.call(); }
@Override protected Item affectItem( Item item, int pos ) { if (item.isIdentified()) { return null; } else { item.identify(); Badges.validateItemLevelAquired( item ); emitter.parent.add( new Identification( DungeonTilemap.tileCenterToWorld( pos ) ) ); return item; } }
public Effect() { super( 0, 0, 0, 0 ); point( sprite.worldToCamera( from ) ); end = sprite.worldToCamera( to ); speed.set( 2 * (end.x - x) / DELAY, 2 * (end.y - y) / DELAY ); acc.set( -speed.x / DELAY, -speed.y / DELAY ); delay = 0; if (sprite.parent != null) sprite.parent.add( this ); }
@Override protected void onItemSelected( Item item ) { curUser.sprite.parent.add( new Identification( curUser.sprite.center().offset( 0, -16 ) ) ); item.identify(); GLog.i( Messages.get(this, "it_is", item) ); Badges.validateItemLevelAquired( item ); }