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. * Get the secondary weapon.
*/ */
public static int getSecondsecondaryWeapon(){ public static int getSecondaryWeapon(){
return PlayerSession.secondaryWeapon; return PlayerSession.secondaryWeapon;
} }
/** /**
* Set the secondary weapon. * Set the secondary weapon.
*/ */
public static void setSecondsecondaryWeapon(int secondaryWeapon){ public static void setSecondaryWeapon(int secondaryWeapon){
PlayerSession.secondaryWeapon = secondaryWeapon; PlayerSession.secondaryWeapon = secondaryWeapon;
} }

View File

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

View File

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

View File

@ -15,7 +15,7 @@ public class SecondaryWeaponAmount extends Entity{
*/ */
public SecondaryWeaponAmount(int x, int y) { public SecondaryWeaponAmount(int x, int y) {
super(x, y); super(x, y);
if(PlayerSession.getSecondsecondaryWeapon() == 1){ if(PlayerSession.getSecondaryWeapon() == 1){
new ImageEntity(this.getX(), this.getY(), "images/shots/rocket.png"); new ImageEntity(this.getX(), this.getY(), "images/shots/rocket.png");
}else{ }else{
new ImageEntity(this.getX(), this.getY(), "images/shots/beamamount.png"); 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"); 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 - 120, 365, "images/shop/shoprocket.png");
new ImageEntity(GameConfig.windowWidth / 2 + 30, 365, "images/shop/shopbeam.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"); select = new ImageEntity(GameConfig.windowWidth / 2 - 130, 355, "images/shop/select.png");
}else{ }else{
select = new ImageEntity(GameConfig.windowWidth / 2 + 20, 355, "images/shop/select.png"); select = new ImageEntity(GameConfig.windowWidth / 2 + 20, 355, "images/shop/select.png");
@ -118,12 +118,12 @@ public class ShopScreen extends Screen {
} }
break; break;
case 3: case 3:
if(PlayerSession.getSecondsecondaryWeapon() == 1){ if(PlayerSession.getSecondaryWeapon() == 1){
select.setPosition(GameConfig.windowWidth / 2 + 20, 355); select.setPosition(GameConfig.windowWidth / 2 + 20, 355);
PlayerSession.setSecondsecondaryWeapon(2); PlayerSession.setSecondaryWeapon(2);
}else{ }else{
select.setPosition(GameConfig.windowWidth / 2 - 130, 355); select.setPosition(GameConfig.windowWidth / 2 - 130, 355);
PlayerSession.setSecondsecondaryWeapon(1); PlayerSession.setSecondaryWeapon(1);
} }
break; break;
case 4: case 4: