private void useTargeting() { if (lastTarget != null && Actor.chars().contains( lastTarget ) && lastTarget.isAlive() && Dungeon.level.heroFOV[lastTarget.pos]) { targeting = true; CharSprite sprite = lastTarget.sprite; sprite.parent.addToFront( crossM ); crossM.point(sprite.center(crossM)); crossB.point(slot.icon.center(crossB)); crossB.visible = true; } else { lastTarget = null; targeting = false; } }
private void useTargeting() { if (lastTarget != null && Actor.chars().contains( lastTarget ) && lastTarget.isAlive() && Dungeon.level.heroFOV[lastTarget.pos]) { targeting = true; CharSprite sprite = lastTarget.sprite; sprite.parent.addToFront( crossM ); crossM.point(sprite.center(crossM)); crossB.point(slot.icon.center(crossB)); crossB.visible = true; } else { lastTarget = null; targeting = false; } }
public void discover( int pos, int oldValue ) { final Image tile = tile( oldValue ); tile.point( tileToWorld( pos ) ); // For bright mode tile.rm = tile.gm = tile.bm = rm; tile.ra = tile.ga = tile.ba = ra; parent.add( tile ); parent.add( new AlphaTweener( tile, 0, 0.6f ) { protected void onComplete() { tile.killAndErase(); killAndErase(); }; } ); }
if (Actor.all().contains(currentTarget) ) { currentTarget.sprite.parent.add(crossM); crossM.point(DungeonTilemap.tileToWorld(currentTarget.pos)); crossB.visible = true; targeting = true;
public void discover( int pos, int oldValue ) { int visual = getTileVisual( pos, oldValue, false); if (visual < 0) return; final Image tile = new Image( texture ); tile.frame( tileset.get( getTileVisual( pos, oldValue, false))); tile.point( tileToWorld( pos ) ); parent.add( tile ); parent.add( new AlphaTweener( tile, 0, 0.6f ) { protected void onComplete() { tile.killAndErase(); killAndErase(); }; } ); }
public void discover( int pos, int oldValue ) { int visual = getTileVisual( pos, oldValue, false); if (visual < 0) return; final Image tile = new Image( texture ); tile.frame( tileset.get( getTileVisual( pos, oldValue, false))); tile.point( tileToWorld( pos ) ); parent.add( tile ); parent.add( new AlphaTweener( tile, 0, 0.6f ) { protected void onComplete() { tile.killAndErase(); killAndErase(); }; } ); }
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); } } ); }
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); } } ); }
-image.origin.x * (image.scale.x - 1), -image.origin.y * (image.scale.y - 1) ); p.offset( image.point() );
-image.origin.x * (image.scale.x - 1), -image.origin.y * (image.scale.y - 1) ); p.offset( image.point() );
-image.origin.x * (image.scale.x - 1), -image.origin.y * (image.scale.y - 1) ); p.offset( image.point() );