Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added an easter egg in the form of padraic mode
  • Loading branch information
jdm13003 committed Apr 20, 2016
1 parent 60bb473 commit c961da2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Binary file modified resources/sprite_sheet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/Game.java
Expand Up @@ -49,6 +49,7 @@ public class Game extends Canvas implements Runnable{
private Controller c;
private Skins tp;
private int numberOfPlayers = 2;
private boolean padraicmode = false;

public void init()
{
Expand Down Expand Up @@ -262,4 +263,7 @@ public class Game extends Canvas implements Runnable{
public void setKills(int kills) {
this.kills = kills;
}
public boolean getPadraic(){
return padraicmode;
}
}
11 changes: 9 additions & 2 deletions src/main/Skins.java
Expand Up @@ -13,21 +13,28 @@ public class Skins {
public BufferedImage enemy1;
public BufferedImage padraic;
public BufferedImage player2;
Game game;

private SpriteSheet ss = null;

public Skins(Game game) {
this.game = game;
ss = new SpriteSheet(game.getSpriteSheet());
getTextures();

}
private void getTextures(){
if(game.getPadraic()){
player = ss.grabimage(2, 2, 64, 64);
laser = ss.grabimage(3, 2, 64, 64);
enemy1 = ss.grabimage(1, 3, 64, 64);
player2 = ss.grabimage(2, 2, 64, 64);
}else{
player = ss.grabimage(playerx, playery, 64, 64);
laser = ss.grabimage(2, 3, 64, 64);
enemy1 = ss.grabimage(2, 1, 64, 64);
padraic = ss.grabimage(2, 2, 64, 64);
player2 = ss.grabimage(3, 1, 64, 64);

}
}

public void setSelection(int x, int y){
Expand Down

0 comments on commit c961da2

Please sign in to comment.