List of usage examples for com.badlogic.gdx.graphics Color YELLOW
Color YELLOW
To view the source code for com.badlogic.gdx.graphics Color YELLOW.
Click Source Link
From source file:net.bplaced.therefactory.voraciousviper.ui.Hud.java
License:Open Source License
public void render(SpriteBatch batch) { if (!gameScreen.getLevel().hadFirstLevelTransition()) { return;/*from w w w . j a v a2s . c o m*/ } spriteTitle.draw(batch); // change color of title if viper has collected the key if (gameScreen.getViper().hasKey()) { spriteKey.draw(batch); } // render number of lives for (int i = 0; i < level.getViper().getNumLives(); i++) { batch.draw(level.getViper().getHeadX2(), livesXOffset + i * level.getViper().getHeadX2().getWidth(), Config.WINDOW_HEIGHT - level.getViper().getHeadX2().getHeight()); } font.setColor(Color.GRAY); int scoreX = 230; font.draw(batch, VoraciousViper.getInstance().getBundle().get(I18NKeys.Level), scoreX + 25, hudPositionY); font.draw(batch, VoraciousViper.getInstance().getBundle().get(I18NKeys.Score), scoreX + 140, hudPositionY); font.draw(batch, VoraciousViper.getInstance().getBundle().get(I18NKeys.Steps), scoreX + 260, hudPositionY); font.setColor(Color.YELLOW); font.draw(batch, stringBuilder.append(Utils.padLeft(level.getViper().getNumSteps(), 4)), scoreX + 215, hudPositionY); stringBuilder.setLength(0); font.draw(batch, stringBuilder.append(Utils.padLeft(level.getViper().getScore(), 4)), scoreX + 95, hudPositionY); stringBuilder.setLength(0); font.draw(batch, stringBuilder.append(Utils.padLeft(level.getIndexCurrentLevel() + 1, 2)), scoreX, hudPositionY); stringBuilder.setLength(0); }
From source file:net.k3rnel.unsealed.battle.BattleEntity.java
License:Open Source License
/** * @param status the status to set/* ww w. j a va2s .c o m*/ */ public void setStatus(int status) { this.status = status; switch (this.status) { case BattleEntity.statusNormal: break; case BattleEntity.statusBurned: actions = sequence(color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.WHITE), run(new Runnable() { @Override public void run() { setState(BattleEntity.statusNormal); } })); this.addAction(actions); break; case BattleEntity.statusStunned: actions = sequence(color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.WHITE), delay(0.1f), run(new Runnable() { @Override public void run() { setStatus(BattleEntity.statusNormal); } })); this.addAction(actions); break; case BattleEntity.statusFrozen: this.status = statusStunned; actions = sequence(color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.WHITE), run(new Runnable() { @Override public void run() { setState(BattleEntity.statusNormal); } })); this.addAction(actions); break; case BattleEntity.statusPoisoned: actions = sequence(color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.WHITE), run(new Runnable() { @Override public void run() { setState(BattleEntity.statusNormal); } })); this.getActions().clear(); this.addAction(actions); break; } }
From source file:net.k3rnel.unsealed.battle.enemies.Xios.java
License:Open Source License
@Override public void setState(int state) { super.setState(state); switch (state) { case BattleEntity.stateIdle: BattleGrid.timer.scheduleTask(nextTask(), BattleGrid.random.nextInt(5)); break;/*from w w w . j av a2s .c o m*/ case BattleEntity.stateAttacking: actions = sequence(color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.WHITE), delay(0.1f)); this.addAction(actions); break; case BattleEntity.stateAltAttacking: actions = sequence(color(Color.GREEN), delay(0.1f), color(Color.YELLOW), delay(0.1f), color(Color.GREEN), delay(0.1f), color(Color.YELLOW), delay(0.1f), color(Color.WHITE), delay(0.1f)); this.addAction(actions); break; } }
From source file:non.plugins.graphics.java
public Color color(String name) { if (name.startsWith("#")) return Color.valueOf(name.replace("#", "")); if ("clear".equalsIgnoreCase(name)) return Color.CLEAR; else if ("white".equalsIgnoreCase(name)) return Color.WHITE; else if ("black".equalsIgnoreCase(name)) return Color.BLACK; else if ("red".equalsIgnoreCase(name)) return Color.RED; else if ("green".equalsIgnoreCase(name)) return Color.GREEN; else if ("blue".equalsIgnoreCase(name)) return Color.BLUE; else if ("lightgray".equalsIgnoreCase(name)) return Color.LIGHT_GRAY; else if ("gray".equalsIgnoreCase(name)) return Color.GRAY; else if ("darkgray".equalsIgnoreCase(name)) return Color.DARK_GRAY; else if ("pink".equalsIgnoreCase(name)) return Color.PINK; else if ("orange".equalsIgnoreCase(name)) return Color.ORANGE; else if ("yellow".equalsIgnoreCase(name)) return Color.YELLOW; else if ("magenta".equalsIgnoreCase(name)) return Color.MAGENTA; else if ("cyan".equalsIgnoreCase(name)) return Color.CYAN; else if ("olive".equalsIgnoreCase(name)) return Color.OLIVE; else if ("purple".equalsIgnoreCase(name)) return Color.PURPLE; else if ("maroon".equalsIgnoreCase(name)) return Color.MAROON; else if ("teal".equalsIgnoreCase(name)) return Color.TEAL; else if ("navy".equalsIgnoreCase(name)) return Color.NAVY; return Color.CLEAR; }
From source file:org.ams.prettypaint.OutlineMerger.java
License:Open Source License
/** For debugging. */ private void debugDraw(ShapeRenderer shapeRenderer) { Vector2 tmp = new Vector2(); Vector2 tmp1 = new Vector2(); shapeRenderer.set(ShapeRenderer.ShapeType.Line); int n = 0;//w w w. j a v a 2 s . c o m for (Array<Vector2> vertices : debug) { if (n == 0) { shapeRenderer.setColor(Color.RED); } if (n == 1) { shapeRenderer.setColor(Color.GREEN); } if (n == 2) { shapeRenderer.setColor(Color.BLUE); } if (n == 3) { shapeRenderer.setColor(Color.YELLOW); } n++; for (int i = 0; i < vertices.size; i++) { Util.getEdge(vertices, i, tmp, tmp1); shapeRenderer.line(tmp.x, tmp.y, tmp1.x, tmp1.y); } } }
From source file:org.shadebob.skineditor.NewFontDialog.java
License:Apache License
/** * /*from w w w. j a va 2s .co m*/ */ public NewFontDialog(final SkinEditorGame game) { super("New Font", game.skin); this.game = game; Table table = new Table(game.skin); table.debug(); table.defaults().pad(10); table.add("Bitmap font name:"); textFontName = new TextField("", game.skin); table.add(textFontName).width(300).left().colspan(4); table.row(); table.add("Source font (TTF):").padRight(10); selectFonts = new SelectBox<String>(game.skin); table.add(selectFonts).left().colspan(4); Map<String, File> mapFonts = new TreeMap<String, File>(game.fm.fonts); Array<String> items = new Array<String>(); Iterator<String> it = mapFonts.keySet().iterator(); boolean arialFound = false; while (it.hasNext()) { String key = it.next(); if (key.equals("Arial") == true) { arialFound = true; } items.add(key); } selectFonts.setItems(items); // Select arial if found if (arialFound == true) { selectFonts.setSelected("Arial"); } table.row(); table.add("Font size:"); selectSize = new SelectBox<String>(game.skin); selectSize.setItems("4", "6", "8", "10", "12", "14", "16", "18", "20", "22", "24", "26", "28", "30", "32", "34", "36", "38", "40", "42", "44", "46", "48", "50", "52", "54", "56"); selectSize.setSelected("16"); table.add(selectSize).left().width(50); checkBold = new CheckBox("Bold", game.skin); table.add(checkBold).left(); checkItalic = new CheckBox("Italic", game.skin); table.add(checkItalic).left(); checkShadow = new CheckBox("Shadow", game.skin); table.add(checkShadow).left().expandX(); table.row(); TextField.TextFieldStyle textStyle = new TextField.TextFieldStyle(); textStyle.cursor = game.skin.getDrawable("cursor"); textStyle.selection = game.skin.getDrawable("selection"); textStyle.background = game.skin.getDrawable("textfield"); textStyle.fontColor = Color.YELLOW; textStyle.font = game.skin.getFont("default-font"); textFontPreview = new TextField("This is a preview text", textStyle); table.add(textFontPreview).pad(20).colspan(5).expand().fill().left(); selectFonts.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { refreshFontPreview(); } }); selectSize.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { refreshFontPreview(); } }); checkBold.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { refreshFontPreview(); } }); checkItalic.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { refreshFontPreview(); } }); checkShadow.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { refreshFontPreview(); } }); refreshFontPreview(); getContentTable().add(table).width(520).height(320).pad(20); getButtonTable().padBottom(15); TextButton buttonCreate = new TextButton("Create Font", game.skin); buttonCreate.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { // First check if the name is already in use if (game.skinProject.has(textFontName.getText(), BitmapFont.class)) { game.showNotice("Error", "A font with the same name already exists!", getStage()); return; } FileHandle handleFont = new FileHandle(System.getProperty("java.io.tmpdir")) .child(textFontName.getText() + ".fnt"); FileHandle handleImage = new FileHandle(System.getProperty("java.io.tmpdir")) .child(textFontName.getText() + ".png"); FileHandle targetFont = new FileHandle( "projects/" + game.screenMain.getcurrentProject() + "/" + textFontName.getText() + ".fnt"); FileHandle targetImage = new FileHandle("projects/" + game.screenMain.getcurrentProject() + "/assets/" + textFontName.getText() + ".png"); if ((targetFont.exists() == true) || (targetImage.exists() == true)) { game.showNotice("Error", "A file with the same name already exists!", getStage()); return; } handleFont.copyTo(targetFont); handleImage.copyTo(targetImage); game.skinProject.add(textFontName.getText(), new BitmapFont(targetFont, targetImage, false)); game.screenMain.saveToSkin(); game.screenMain.refreshResources(); hide(); } }); getButtonTable().add(buttonCreate); button("Cancel", false); key(com.badlogic.gdx.Input.Keys.ESCAPE, false); }
From source file:org.shadebob.skineditor.NewFontDialog.java
License:Apache License
/** * //from w w w.j av a2 s. c om */ public void refreshFontPreview() { try { String fontName = selectFonts.getSelected(); Gdx.app.log("FontPickerDialog", "Refreshing preview for font: " + fontName); File fontPath = game.fm.fonts.get(selectFonts.getSelected()); Gdx.app.log("FontPickerDialog", "Loading font from file:" + fontPath); Font font = Font.createFont(Font.TRUETYPE_FONT, fontPath); UnicodeFont unicodeFont = new UnicodeFont(font, Integer.valueOf(selectSize.getSelected()), checkBold.isChecked(), checkItalic.isChecked()); if (checkShadow.isChecked() == true) { ColorEffect colorEffect = new ColorEffect(); colorEffect.setColor(java.awt.Color.BLACK); unicodeFont.getEffects().add(colorEffect); ShadowEffect shadow = new ShadowEffect(); shadow.setOpacity(1.0f); shadow.setXDistance(1); shadow.setYDistance(1); shadow.setColor(java.awt.Color.WHITE); unicodeFont.getEffects().add(shadow); } else { ColorEffect colorEffect = new ColorEffect(); colorEffect.setColor(java.awt.Color.WHITE); unicodeFont.getEffects().add(colorEffect); } unicodeFont.addAsciiGlyphs(); // Generate a temporary name for your font (Do not end with a number, it will be removed in the atlas) String newFontName = "font_" + fontName.toLowerCase().replace(" ", "_") + "_" + selectSize.getSelected() + "pt"; if (checkBold.isChecked() == true) { newFontName += "_bold"; } if (checkItalic.isChecked() == true) { newFontName += "_italic"; } textFontName.setText(newFontName); // Create bitmap font BMFontUtil bfu = new BMFontUtil(unicodeFont); FileHandle handle = new FileHandle(System.getProperty("java.io.tmpdir")).child(newFontName); FileHandle handleFont = new FileHandle(handle.file().getAbsolutePath() + ".fnt"); bfu.save(handle.file()); FileHandle handleImage = new FileHandle(System.getProperty("java.io.tmpdir")) .child(newFontName + ".png"); TextField.TextFieldStyle textStyle = new TextField.TextFieldStyle(); textStyle.cursor = game.skin.getDrawable("cursor"); textStyle.selection = game.skin.getDrawable("selection"); textStyle.background = game.skin.getDrawable("textfield"); textStyle.fontColor = Color.YELLOW; textStyle.font = new BitmapFont(handleFont, handleImage, false); textFontPreview.setStyle(textStyle); // Have to do this to force clipping of font textFontPreview.setText(textFontPreview.getText()); } catch (Exception e) { e.printStackTrace(); textFontPreview.getStyle().font = game.skin.getFont("default-font"); // Have to do this to force clipping of font textFontPreview.setText(textFontPreview.getText()); } }
From source file:tilo.modules.graphics.java
License:Open Source License
public Color color(String name) { if (name.startsWith("#")) return Color.valueOf(name.replace("#", "")); if ("clear".equalsIgnoreCase(name)) return Color.CLEAR; else if ("white".equalsIgnoreCase(name)) return Color.WHITE; else if ("black".equalsIgnoreCase(name)) return Color.BLACK; else if ("red".equalsIgnoreCase(name)) return Color.RED; else if ("green".equalsIgnoreCase(name)) return Color.GREEN; else if ("blue".equalsIgnoreCase(name)) return Color.BLUE; else if ("lightgray".equalsIgnoreCase(name)) return Color.LIGHT_GRAY; else if ("gray".equalsIgnoreCase(name)) return Color.GRAY; else if ("darkgray".equalsIgnoreCase(name)) return Color.DARK_GRAY; else if ("pink".equalsIgnoreCase(name)) return Color.PINK; else if ("orange".equalsIgnoreCase(name)) return Color.ORANGE; else if ("yellow".equalsIgnoreCase(name)) return Color.YELLOW; else if ("magenta".equalsIgnoreCase(name)) return Color.MAGENTA; else if ("cyan".equalsIgnoreCase(name)) return Color.CYAN; return Color.CLEAR; }
From source file:us.thirdmillenium.strategicassaultsimulator.environment.GameEnvironment.java
License:Apache License
@Override public void simulate(float deltaTime) { // Compute time delta (max of frame speed) deltaTime = (float) Math.min(deltaTime, 1 / Params.FramesPerSecond); if (DRAW) {//w ww . j a va 2 s . c om // Clear Background Gdx.gl.glClearColor(1, 0, 0, 1); Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); // Draw Map this.Camera.update(); this.TiledMapRenderer.setView(this.Camera); this.TiledMapRenderer.render(); } // Test if Bullets Intersected with Anything MapObjects wallMapObjects = this.TiledMap.getLayers().get(2).getObjects(); Iterator<GreenBullet> bullets = this.BulletTracker.iterator(); this.SpriteBatchRenderer.setProjectionMatrix(this.Camera.combined); this.SpriteBatchRenderer.begin(); while (bullets.hasNext()) { // Collect a Bullet to consider GreenBullet currentBullet = bullets.next(); if (DRAW) { currentBullet.drawSprite(this.SpriteBatchRenderer); } currentBullet.updateBullet(deltaTime); // If bullet is off-screen, remove it. if (currentBullet.getBulletVector().x < 0 || currentBullet.getBulletVector().x > this.width || currentBullet.getBulletVector().y < 0 || currentBullet.getBulletVector().y > this.height) { this.BulletTracker.remove(currentBullet); } else { // Compare with all Agents Rectangle agentBound; Iterator<AgentModel> shootItr = this.shooters.iterator(); while (shootItr.hasNext()) { AgentModel currShooter = shootItr.next(); if (!currentBullet.thisAgentShotMe(currShooter) && Intersector.overlapConvexPolygons( GraphicsHelpers.convertRectangleToPolygon(currShooter.getBoundingRectangle()), currentBullet.getBulletPath())) { currShooter.agentHit(); this.BulletTracker.remove(currentBullet); } } Iterator<AgentModel> agentItr = this.trainees.iterator(); while (agentItr.hasNext()) { AgentModel currAgent = agentItr.next(); if (!currentBullet.thisAgentShotMe(currAgent) && Intersector.overlapConvexPolygons( GraphicsHelpers.convertRectangleToPolygon(currAgent.getBoundingRectangle()), currentBullet.getBulletPath())) { currAgent.agentHit(); this.BulletTracker.remove(currentBullet); } } // Compare with all Wall Boundaries for (int i = 0; i < wallMapObjects.getCount(); i++) { Object rectangleMapObject = wallMapObjects.get(i); // Make sure this is a Rectangle from Tiled describing a wall. if (rectangleMapObject.getClass() == RectangleMapObject.class) { Rectangle wallRectangle = ((RectangleMapObject) rectangleMapObject).getRectangle(); Polygon polyBound = GraphicsHelpers.convertRectangleToPolygon(wallRectangle); // Terminate when hitting a wall if (Intersector.overlapConvexPolygons(polyBound, currentBullet.getBulletPath())) { this.BulletTracker.remove(currentBullet); } } } } } this.SpriteBatchRenderer.end(); // Draw DEBUG information if (DEBUG && DRAW) { // Draw Map Nodes /*this.MapNodeSR.setProjectionMatrix(this.Camera.combined); this.MapNodeSR.setColor(Color.OLIVE); this.MapNodeSR.begin(ShapeRenderer.ShapeType.Filled); if (this.TraverseNodes != null) { for (Integer key : this.TraverseNodes.keySet()) { this.MapNodeSR.circle(this.TraverseNodes.get(key).getPixelX(), this.TraverseNodes.get(key).getPixelY(), 10); } } this.MapNodeSR.end();*/ // Draw Overlay Lines this.LineRenderer.setProjectionMatrix(this.Camera.combined); this.LineRenderer.begin(ShapeRenderer.ShapeType.Filled); // For each Agent. Different Colors? this.LineRenderer.setColor(Color.BLACK); /*if( PUPPET ) { this.puppet.drawPath(this.LineRenderer); }*/ Iterator<AgentModel> agentItr = this.trainees.iterator(); while (agentItr.hasNext()) { AgentModel currAgent = agentItr.next(); currAgent.drawPath(this.LineRenderer); } this.LineRenderer.end(); } // Draw Agent Sprites this.SpriteBatchRenderer.begin(); /*if( PUPPET ) { this.puppet.updateAgent(deltaTime); this.puppet.drawAgent(this.SpriteBatchRenderer); }*/ Iterator<AgentModel> shootItr = this.shooters.iterator(); while (shootItr.hasNext()) { AgentModel currShooter = shootItr.next(); currShooter.updateAgent(deltaTime); if (DRAW) { currShooter.drawAgent(this.SpriteBatchRenderer); } } Iterator<AgentModel> agentItr = this.trainees.iterator(); while (agentItr.hasNext()) { AgentModel currAgent = agentItr.next(); currAgent.updateAgent(deltaTime); if (DRAW) { currAgent.drawAgent(this.SpriteBatchRenderer); } } this.SpriteBatchRenderer.end(); if (DEBUG) { Iterator<AgentModel> agentItr2 = this.trainees.iterator(); ShapeRenderer visionCone = new ShapeRenderer(); visionCone.setProjectionMatrix(this.Camera.combined); visionCone.begin(ShapeRenderer.ShapeType.Line); visionCone.setColor(Color.YELLOW); while (agentItr2.hasNext()) { AgentModel currAgent = agentItr2.next(); currAgent.drawVision(visionCone); } visionCone.end(); } /*// Test Draw the Collision Boxes if( DEBUG && DRAW ) { ShapeRenderer anotherShapeRenderer = new ShapeRenderer(); anotherShapeRenderer.setProjectionMatrix(this.Camera.combined); anotherShapeRenderer.begin(ShapeRenderer.ShapeType.Line); bullets = this.BulletTracker.iterator(); while(bullets.hasNext()) { GreenBullet currentBullet = bullets.next(); anotherShapeRenderer.polygon(currentBullet.getBulletPath().getTransformedVertices()); } for(int i = 0; i < wallMapObjects.getCount(); i++ ){ Object obj = wallMapObjects.get(i); if( obj.getClass() == RectangleMapObject.class ) { Rectangle boundary = ((RectangleMapObject)obj).getRectangle(); anotherShapeRenderer.rect(boundary.x, boundary.y, boundary.width, boundary.height); float[] vertices = { boundary.x, boundary.y, boundary.x + boundary.width, boundary.y, boundary.x + boundary.width, boundary.y + boundary.height, boundary.x, boundary.y + boundary.height }; //Polygon polyBound = new Polygon(vertices); anotherShapeRenderer.setColor(Color.BLUE); anotherShapeRenderer.polygon(vertices); } } anotherShapeRenderer.end(); }*/ }
From source file:vault.clockwork.editor.props.GroundProp.java
License:Open Source License
/** * Draw the turret radius as bounds.//from w ww.ja v a2 s . co m * @param gizmo */ @Override public void draw(ShapeRenderer gizmo) { gizmo.setColor(Color.YELLOW); gizmo.rect(-100.f * Physics.SCALE_INV, -2.f * Physics.SCALE_INV, 200.f * Physics.SCALE_INV, .4f * Physics.SCALE_INV); }