Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

GunPositions

Just changed a few positions and added...I'm thinking of removing the 45
degree ones....let's not give the player lot's of range? Headed that
way...
  • Loading branch information...
commit c4d045be781ebec241e373d5407b671679dded3f 1 parent b3cbc83
@SubSage authored
View
41 GDCalaga/src/org/gdc/gdcalaga/GunPositions.java
@@ -43,6 +43,38 @@ private void build()
positions.add(new Vector2f(playerWidth / 4, -playerHeight / 3));
directions.add(new Vector2f(1, 0));
+ //diagonal front lefterest
+ positions.add(new Vector2f(playerWidth / 2, playerHeight / 2));
+ directions.add(new Vector2f(1, (float) .1));
+
+ //diagonal front righterest
+ positions.add(new Vector2f(playerWidth / 2, -playerHeight / 2));
+ directions.add(new Vector2f(1, (float) -.1));
+
+ //diagonal front lefterest INVERTED
+ positions.add(new Vector2f(playerWidth / 2, playerHeight / 2));
+ directions.add(new Vector2f(1, (float) -.1));
+
+ //diagonal front righterest INVERTED
+ positions.add(new Vector2f(playerWidth / 2, -playerHeight / 2));
+ directions.add(new Vector2f(1, (float) .1));
+
+ //diagonal front lefter
+ positions.add(new Vector2f(playerWidth / 2, playerHeight / 2));
+ directions.add(new Vector2f((float) .5, 1));
+
+ //diagonal front righter
+ positions.add(new Vector2f(playerWidth / 2, -playerHeight / 2));
+ directions.add(new Vector2f((float) .5,-1));
+
+ //diagonal front left
+ positions.add(new Vector2f(playerWidth / 2, playerHeight / 2));
+ directions.add(new Vector2f(1, 1));
+
+ //diagonal front right
+ positions.add(new Vector2f(playerWidth / 2, -playerHeight / 2));
+ directions.add(new Vector2f(1, -1));
+
//left side mounted gun
positions.add(new Vector2f(-playerWidth / 15, playerHeight / 2));
directions.add(new Vector2f(0, 1));
@@ -54,15 +86,6 @@ private void build()
//backwards
positions.add(new Vector2f(-playerWidth / 2, 0));
directions.add(new Vector2f(-1, 0));
-
- //diagonal front left
- positions.add(new Vector2f(playerWidth / 2, playerHeight / 2));
- directions.add(new Vector2f(1, 1));
-
- //diagonal front right
- positions.add(new Vector2f(playerWidth / 2, -playerHeight / 2));
- directions.add(new Vector2f(1, -1));
-
}
public Vector2f getPosition(int index)
View
2  GDCalaga/src/org/gdc/gdcalaga/PlayState.java
@@ -107,7 +107,7 @@ public void update(GameContainer container, StateBasedGame game, int delta) thro
}
}
- if(input.isKeyDown(Input.KEY_Z))
+ if(input.isKeyDown(Input.KEY_Q))
{
if (player.activateShield(delta))
{
Please sign in to comment.
Something went wrong with that request. Please try again.