Set version variable to prepare for the next version (I tend to forget that kind of stuff).
This commit is contained in:
parent
84dd04008f
commit
a05307f38a
@ -16,6 +16,8 @@ import spaceshipsim.entities.*;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SimPanel extends JPanel implements Runnable, KeyListener {
|
public class SimPanel extends JPanel implements Runnable, KeyListener {
|
||||||
|
public final static String version = "v0.3";
|
||||||
|
|
||||||
// Graphics/Framework items
|
// Graphics/Framework items
|
||||||
private Thread gameloop;
|
private Thread gameloop;
|
||||||
//private BufferedImage backbuffer;
|
//private BufferedImage backbuffer;
|
||||||
@ -53,7 +55,7 @@ public class SimPanel extends JPanel implements Runnable, KeyListener {
|
|||||||
private void drawInfo() {
|
private void drawInfo() {
|
||||||
g2d.translate(0, 10);
|
g2d.translate(0, 10);
|
||||||
g2d.setColor(Color.WHITE);
|
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("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("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);
|
g2d.drawString("Acceleration (px/s/s): " + (int)(ship.getAccelX() * Math.pow(50, 2)) + ", " + (int)(ship.getAccelY() * Math.pow(50, 2)), 10, 55);
|
||||||
|
@ -71,7 +71,7 @@ public class SpaceShipSim {
|
|||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent ae) {
|
public void actionPerformed(ActionEvent ae) {
|
||||||
new Window("License Information",
|
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" +
|
"Copyright (C) 2014 Nicolás A. Ortega\n\n" +
|
||||||
"This program is free software: you can redistribute it and/or modify\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" +
|
"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() {
|
aboutItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent ae) {
|
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" +
|
"Copyright (C) 2014 Nicolás A. Ortega\n" +
|
||||||
"Contact: nicolas.ortega.froysa@gmail.com\n" +
|
"Contact: nicolas.ortega.froysa@gmail.com\n" +
|
||||||
"Source-code: https://github.com/Deathsbreed/SpaceShipSim\n" +
|
"Source-code: https://github.com/Deathsbreed/SpaceShipSim\n" +
|
||||||
|
Loading…
Reference in New Issue
Block a user