Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed a few more things
  • Loading branch information
jdm13003 committed Apr 27, 2016
1 parent f9ae420 commit f0529ac
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/main/Controller.java
Expand Up @@ -37,7 +37,6 @@ public class Controller {







public void createSD(int SDcount){ public void createSD(int SDcount){
for(int n = 0; n < SDcount; n++){ for(int n = 0; n < SDcount; n++){
addEntity(new StarDestroyer(810, r.nextInt(400), skin, this, game)); addEntity(new StarDestroyer(810, r.nextInt(400), skin, this, game));
Expand Down
1 change: 1 addition & 0 deletions src/main/EnemyFighter.java
Expand Up @@ -55,6 +55,7 @@ public class EnemyFighter extends GameObject implements EntityTypeB{
game.setScore(game.getScore()+10); game.setScore(game.getScore()+10);
} }
} }

} }
public void render(Graphics g){ public void render(Graphics g){
g.drawImage(skin.enemy1, (int)x, (int)y, null); g.drawImage(skin.enemy1, (int)x, (int)y, null);
Expand Down
6 changes: 6 additions & 0 deletions src/main/MouseInput.java
Expand Up @@ -50,6 +50,12 @@ public class MouseInput implements MouseListener{
Game.padraicmode = true; Game.padraicmode = true;
Game.State = Game.STATE.GAME; Game.State = Game.STATE.GAME;
} }
else if(mx >= 0 && mx <= 40 && my >= 0 && my <= 40)
{
Game.numberOfPlayers = 2;
Game.padraicmode = true;
Game.State = Game.STATE.GAME;
}
} }


} }
Expand Down
2 changes: 1 addition & 1 deletion src/main/Player.java
Expand Up @@ -44,7 +44,7 @@ public class Player extends GameObject implements EntityTypeA{
if(GamePhysics.Collision(this, tempa)){ if(GamePhysics.Collision(this, tempa)){
if(health == 1){ if(health == 1){
game.State = game.State.END; game.State = game.State.END;
health = 3; health = 4;
} }
else{ else{
health--; health--;
Expand Down
2 changes: 1 addition & 1 deletion src/main/Player2.java
Expand Up @@ -45,7 +45,7 @@ public class Player2 extends GameObject implements EntityTypeA{
if(health == 1){ if(health == 1){
controller.removeEntity(this); controller.removeEntity(this);
game.State = game.State.END; game.State = game.State.END;
health = 4; health = 5;
} }
else{ else{
health--; health--;
Expand Down
1 change: 1 addition & 0 deletions src/main/StarDestroyer.java
Expand Up @@ -48,6 +48,7 @@ public class StarDestroyer extends GameObject implements EntityTypeC{
} }
} }



} }
public void shoot(){ public void shoot(){
if(is_shooting == 0){ if(is_shooting == 0){
Expand Down

0 comments on commit f0529ac

Please sign in to comment.