fixed the controls (swapped W/S keys), fixed the accidentally commited variable level set to 3+playerActive which was set to true)
This commit is contained in:
parent
5e60db0dc4
commit
f36b9415eb
2 changed files with 4 additions and 4 deletions
|
|
@ -60,7 +60,7 @@ public class Game extends JPanel implements ActionListener {
|
||||||
/* defines the level which is used to determine what exactly shows (for example main menu is level 1),
|
/* defines the level which is used to determine what exactly shows (for example main menu is level 1),
|
||||||
levelProgress which is only used for the animation from level 1 to level 2
|
levelProgress which is only used for the animation from level 1 to level 2
|
||||||
and fadeAnimation which is also used for the animation from level 1 to level 2 */
|
and fadeAnimation which is also used for the animation from level 1 to level 2 */
|
||||||
public int level = 3;
|
public int level = 1;
|
||||||
public boolean levelProgress = false; // this is used to make the transition from the Game menu to the game level look cool
|
public boolean levelProgress = false; // this is used to make the transition from the Game menu to the game level look cool
|
||||||
public int fadeAnimation = 0;
|
public int fadeAnimation = 0;
|
||||||
|
|
||||||
|
|
@ -117,7 +117,7 @@ public class Game extends JPanel implements ActionListener {
|
||||||
public int playerWalkingModifier = 5;
|
public int playerWalkingModifier = 5;
|
||||||
public boolean playerOnFeet = true;
|
public boolean playerOnFeet = true;
|
||||||
public boolean playerJumped = false;
|
public boolean playerJumped = false;
|
||||||
public boolean playerActive = true;
|
public boolean playerActive = false;
|
||||||
public int walkTick;
|
public int walkTick;
|
||||||
public static int ticksPerFrame = 8;
|
public static int ticksPerFrame = 8;
|
||||||
public static int[] walkCycle = {1, 0, 2, 0};
|
public static int[] walkCycle = {1, 0, 2, 0};
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,13 @@ public class input implements KeyListener {
|
||||||
if (m.playerActive) {
|
if (m.playerActive) {
|
||||||
switch (e.getKeyCode()) {
|
switch (e.getKeyCode()) {
|
||||||
case KeyEvent.VK_W:
|
case KeyEvent.VK_W:
|
||||||
m.playerDirection = "forward";
|
m.playerDirection = "backward";
|
||||||
break;
|
break;
|
||||||
case KeyEvent.VK_A:
|
case KeyEvent.VK_A:
|
||||||
m.playerDirection = "left";
|
m.playerDirection = "left";
|
||||||
break;
|
break;
|
||||||
case KeyEvent.VK_S:
|
case KeyEvent.VK_S:
|
||||||
m.playerDirection = "backward";
|
m.playerDirection = "forward";
|
||||||
break;
|
break;
|
||||||
case KeyEvent.VK_D:
|
case KeyEvent.VK_D:
|
||||||
m.playerDirection = "right";
|
m.playerDirection = "right";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue