Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed FIRE_RATE upgrade

FIRE_RATE upgrade is correctly working now.
  • Loading branch information...
commit 4132ecf287831106f75338b6fdc8d7e452218fe7 1 parent ab4625a
@SubSage authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 GDCalaga/src/org/gdc/gdcalaga/Player.java
View
5 GDCalaga/src/org/gdc/gdcalaga/Player.java
@@ -51,7 +51,7 @@ public Player(EntityManager manager, Vector2f position)
health = 10;
shields = 0;
- fireRate = 5; //bullets per second
+ fireRate = 20; //bullets per second
ticksPerBullet = (int)(1000 / fireRate); //milliseconds in a second / fireRate
//since delta time is in milliseconds
ticksSinceLastBullet = ticksPerBullet; //so we can shoot right off the bat
@@ -181,7 +181,8 @@ public static void upgrade(Upgrade.UpgradeType upgrade)
shields+=3;
break;
case FIRE_RATE:
- fireRate+=10;//ticksPerBullet....might need some change/rework/etc
+ fireRate +=1;
+ ticksPerBullet = (int)(1000 / fireRate); //A little bit weird that we have to do these two things...
break;
case NUM_GUNS:
Please sign in to comment.
Something went wrong with that request. Please try again.