Remove a superfluos "second" from method names.

This commit is contained in:
Jan Philipp Timme 2014-12-16 12:34:48 +01:00
parent b6c96105a6
commit 5352131e01
5 changed files with 10 additions and 10 deletions

View File

@ -231,14 +231,14 @@ public class PlayerSession {
/**
* Get the secondary weapon.
*/
public static int getSecondsecondaryWeapon(){
public static int getSecondaryWeapon(){
return PlayerSession.secondaryWeapon;
}
/**
* Set the secondary weapon.
*/
public static void setSecondsecondaryWeapon(int secondaryWeapon){
public static void setSecondaryWeapon(int secondaryWeapon){
PlayerSession.secondaryWeapon = secondaryWeapon;
}

View File

@ -108,9 +108,9 @@ public class Player extends ShootingEntity implements KeyboardListener {
}
if(Keyboard.isKeyDown(KeyEvent.VK_Y)) {
if(this.secondaryWeaponAmount > 0){
if(PlayerSession.getSecondsecondaryWeapon() == 1) {
if(PlayerSession.getSecondaryWeapon() == 1) {
this.shootRocket();
}else if(PlayerSession.getSecondsecondaryWeapon() == 2) {
}else if(PlayerSession.getSecondaryWeapon() == 2) {
this.shootBeam();
}
}

View File

@ -92,7 +92,7 @@ public abstract class Item extends CollidableEntity {
new ItemShield(x, y);
break;
case 4:
if(PlayerSession.getSecondsecondaryWeapon() == 1){
if(PlayerSession.getSecondaryWeapon() == 1){
new ItemRocket(x, y);
}else{
new ItemBeam(x, y);

View File

@ -15,7 +15,7 @@ public class SecondaryWeaponAmount extends Entity{
*/
public SecondaryWeaponAmount(int x, int y) {
super(x, y);
if(PlayerSession.getSecondsecondaryWeapon() == 1){
if(PlayerSession.getSecondaryWeapon() == 1){
new ImageEntity(this.getX(), this.getY(), "images/shots/rocket.png");
}else{
new ImageEntity(this.getX(), this.getY(), "images/shots/beamamount.png");

View File

@ -35,7 +35,7 @@ public class ShopScreen extends Screen {
life = new ShopOffer(100, 300, 15, PlayerSession.getBaseHealthUpgradesBought(), "Leben 10C");
new ImageEntity(GameConfig.windowWidth / 2 - 120, 365, "images/shop/shoprocket.png");
new ImageEntity(GameConfig.windowWidth / 2 + 30, 365, "images/shop/shopbeam.png");
if(PlayerSession.getSecondsecondaryWeapon() == 1){
if(PlayerSession.getSecondaryWeapon() == 1){
select = new ImageEntity(GameConfig.windowWidth / 2 - 130, 355, "images/shop/select.png");
}else{
select = new ImageEntity(GameConfig.windowWidth / 2 + 20, 355, "images/shop/select.png");
@ -118,12 +118,12 @@ public class ShopScreen extends Screen {
}
break;
case 3:
if(PlayerSession.getSecondsecondaryWeapon() == 1){
if(PlayerSession.getSecondaryWeapon() == 1){
select.setPosition(GameConfig.windowWidth / 2 + 20, 355);
PlayerSession.setSecondsecondaryWeapon(2);
PlayerSession.setSecondaryWeapon(2);
}else{
select.setPosition(GameConfig.windowWidth / 2 - 130, 355);
PlayerSession.setSecondsecondaryWeapon(1);
PlayerSession.setSecondaryWeapon(1);
}
break;
case 4: