Set version variable to prepare for the next version (I tend to forget that kind of stuff).

This commit is contained in:
Deathsbreed 2014-05-28 10:15:20 -05:00
parent 84dd04008f
commit a05307f38a
2 changed files with 5 additions and 3 deletions

View File

@ -16,6 +16,8 @@ import spaceshipsim.entities.*;
*
*/
public class SimPanel extends JPanel implements Runnable, KeyListener {
public final static String version = "v0.3";
// Graphics/Framework items
private Thread gameloop;
//private BufferedImage backbuffer;
@ -53,7 +55,7 @@ public class SimPanel extends JPanel implements Runnable, KeyListener {
private void drawInfo() {
g2d.translate(0, 10);
g2d.setColor(Color.WHITE);
g2d.drawString("Welcome to SpaceShipSim v0.2", 10, 10);
g2d.drawString("Welcome to SpaceShipSim " + version, 10, 10);
g2d.drawString("Position: " + (int)ship.getX() + ", " + (int)ship.getY(), 10, 25);
g2d.drawString("Velocity (px/s): " + (int)(ship.getVelX() * 50) + ", " + (int)(ship.getVelY() * 50), 10, 40);
g2d.drawString("Acceleration (px/s/s): " + (int)(ship.getAccelX() * Math.pow(50, 2)) + ", " + (int)(ship.getAccelY() * Math.pow(50, 2)), 10, 55);

View File

@ -71,7 +71,7 @@ public class SpaceShipSim {
@Override
public void actionPerformed(ActionEvent ae) {
new Window("License Information",
"SpaceShipSim v0.2, a simulation of a spaceship in a frictionless environment\n" +
"SpaceShipSim " + panel.version + ", a simulation of a spaceship in a frictionless environment\n" +
"Copyright (C) 2014 Nicolás A. Ortega\n\n" +
"This program is free software: you can redistribute it and/or modify\n" +
"it under the terms of the GNU General Public License as published by\n" +
@ -88,7 +88,7 @@ public class SpaceShipSim {
aboutItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
new Window("About", "SpaceShipSim v0.2\n" +
new Window("About", "SpaceShipSim +" + panel.version + "\n" +
"Copyright (C) 2014 Nicolás A. Ortega\n" +
"Contact: nicolas.ortega.froysa@gmail.com\n" +
"Source-code: https://github.com/Deathsbreed/SpaceShipSim\n" +