public void render() { ClientOverworldStage cs = (ClientOverworldStage) stage; Renderer.translate(-cs.camX, -cs.camY); Renderer.addClip(0, 0, 368, 240, true); if (FEResources.hasTexture(functionalClassName().toLowerCase() + "_map_idle")) { Transform t = new Transform(); if (sprite.getAnimationName().equals("RIGHT")) { t.flipHorizontal(); t.setTranslation(14, 0); // Why do we have to do this? } Color mod = new Color(1.0f, 1.0f, 1.0f, 1.0f); t.setColor(mod); if (moved) { sprite.render(x + 1 + rX, y + 1 + rY, renderDepth, t, new ShaderArgs("greyscale")); } else { ShaderArgs args = PaletteSwapper.setup(this); sprite.render(x + 1 + rX, y + 1 + rY, renderDepth, t, args); } } else { Color c = !moved ? new Color(getPartyColor()) : new Color(128, 128, 128); Renderer.drawRectangle( x + 1 + rX, y + 1 + rY, x + 14 + rX, y + 14 + rY, ClientOverworldStage.UNIT_DEPTH, c); Renderer.drawString( "default_med", name.charAt(0) + "" + name.charAt(1), x + 2 + rX, y + 1 + rY, ClientOverworldStage.UNIT_DEPTH); } if (rescuedUnit != null) { counter += Game.getDeltaSeconds(); counter %= 1; if (counter > 0.5) { Renderer.render(rescue, 0, 0, 1, 1, x + 9, y + 7, x + 9 + 8, y + 7 + 8, renderDepth); } } Renderer.removeClip(); Renderer.translate(cs.camX, cs.camY); }
public void render() { int imageW = mug.getImageWidth(); int imageH = mug.getImageHeight(); int menuW = this.getWidth(); Transform t = new Transform(); if (flip) t.flipHorizontal(); Renderer.render( mug, 0, 0, 1, 1, x + menuW / 2 - imageW / 2, y - imageH, x + menuW / 2 + imageW / 2, y, renderDepth, t); super.render(); }
/* (non-Javadoc) * @see chu.engine.Entity#render() */ public void render() { // Main status Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 120, FightStage.FLOOR + 12, FightStage.CENTRAL_AXIS, FightStage.FLOOR + 56, renderDepth, FightStage.BORDER_DARK); Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 119, FightStage.FLOOR + 13, FightStage.CENTRAL_AXIS + sign, FightStage.FLOOR + 55, renderDepth, FightStage.BORDER_LIGHT); Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 118, FightStage.FLOOR + 14, FightStage.CENTRAL_AXIS + sign * 2, FightStage.FLOOR + 54, renderDepth, unit.getPartyColor().darker(0.5f)); // Weapon Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 119, FightStage.FLOOR + 13, FightStage.CENTRAL_AXIS + sign, FightStage.FLOOR + 31, renderDepth, FightStage.BORDER_LIGHT); Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 118, FightStage.FLOOR + 14, FightStage.CENTRAL_AXIS + sign * 2, FightStage.FLOOR + 30, renderDepth, FightStage.NEUTRAL); // Attack Stats Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 120, FightStage.FLOOR + 2, FightStage.CENTRAL_AXIS + sign * 76, FightStage.FLOOR + 32, renderDepth, FightStage.BORDER_DARK); Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 119, FightStage.FLOOR + 3, FightStage.CENTRAL_AXIS + sign * 77, FightStage.FLOOR + 31, renderDepth, FightStage.BORDER_LIGHT); Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 118, FightStage.FLOOR + 4, FightStage.CENTRAL_AXIS + sign * 78, FightStage.FLOOR + 30, renderDepth, unit.getPartyColor()); Renderer.render( battleStats, 0, 0, 1, 1, FightStage.CENTRAL_AXIS + sign * 98 - 18, FightStage.FLOOR + 5, FightStage.CENTRAL_AXIS + sign * 98 - 3, FightStage.FLOOR + 29, renderDepth); Renderer.drawString( "stat_numbers", hit, FightStage.CENTRAL_AXIS + sign * 98 - 5, FightStage.FLOOR + 5, renderDepth); Renderer.drawString( "stat_numbers", dmg, FightStage.CENTRAL_AXIS + sign * 98 - 5, FightStage.FLOOR + 13, renderDepth); Renderer.drawString( "stat_numbers", crit, FightStage.CENTRAL_AXIS + sign * 98 - 5, FightStage.FLOOR + 21, renderDepth); // Name Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 120, FightStage.FLOOR - 99, FightStage.CENTRAL_AXIS + sign * 63, FightStage.FLOOR - 77, renderDepth, FightStage.BORDER_DARK); Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 120, FightStage.FLOOR - 98, FightStage.CENTRAL_AXIS + sign * 64, FightStage.FLOOR - 78, renderDepth, FightStage.BORDER_LIGHT); Renderer.drawRectangle( FightStage.CENTRAL_AXIS + sign * 120, FightStage.FLOOR - 97, FightStage.CENTRAL_AXIS + sign * 65, FightStage.FLOOR - 79, renderDepth, unit.getPartyColor()); Renderer.drawString( "default_med", unit.name, FightStage.CENTRAL_AXIS + sign * 94 - 16, 11, 0.0f); }