Permalink
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...
1 parent b3cbc83 commit c4d045be781ebec241e373d5407b671679dded3f @SubSage committed Apr 28, 2013
Showing with 33 additions and 10 deletions.
  1. +32 −9 GDCalaga/src/org/gdc/gdcalaga/GunPositions.java
  2. +1 −1 GDCalaga/src/org/gdc/gdcalaga/PlayState.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)
@@ -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))
{

0 comments on commit c4d045b

Please sign in to comment.