Added missing override annotations

This commit is contained in:
Bokros Bálint 2016-05-14 13:47:14 +02:00
parent b02a5756a5
commit f8eb39d2fb
7 changed files with 12 additions and 0 deletions

View File

@ -7,9 +7,11 @@ public class Box implements Pickable, Destroyable {
public Box() {
}
@Override
public void destroy() {
}
@Override
public void pick() {
}

View File

@ -10,6 +10,7 @@ public class Field extends cicaprojekt.Tile {
return boxStack.isEmpty();
}
@Override
public void onEntry(PlayerBase playerBase) {
super.onEntry(playerBase);
if (boxStack.size() > 0)
@ -19,5 +20,6 @@ public class Field extends cicaprojekt.Tile {
playerBase.pickZPM(this);
}
@Override
public void onExit(PlayerBase playerBase) {}
}

View File

@ -11,11 +11,13 @@ public class Gap extends cicaprojekt.Tile {
return true;
}
@Override
public void onEntry(PlayerBase playerBase) {
super.onEntry(playerBase);
playerBase.destroy();
}
@Override
public void onExit(PlayerBase playerBase) throws IllegalStateException {
throw new IllegalStateException("Hiba! A szakadékból nem jut ki semmi!");
}

View File

@ -12,11 +12,13 @@ public class Gate extends Tile {
if (this.open) adjacentTile.get(direction).spawnStargate(stargate, direction);
}
@Override
public void onEntry(PlayerBase playerBase) {
super.onEntry(playerBase);
if (open) playerBase.setCurrentTile(this);
}
@Override
public void onExit(PlayerBase playerBase) throws IllegalStateException {
if (!open) {
throw new IllegalStateException("Hiba! Te hogy kerültél a csukott ajtóba?");

View File

@ -18,6 +18,7 @@ public class PlayerBase implements Destroyable {
return String.format("%s: %s", name, currentTile);
}
@Override
public void destroy() {
destroyed = true;
Game.instance.playerBaseDestroyed(this);

View File

@ -30,12 +30,14 @@ public class Wall extends Tile {
}
}
@Override
public void onEntry(PlayerBase playerBase) {
super.onEntry(playerBase);
if (sg != null)
sg.teleport(playerBase);
}
@Override
public void onExit(PlayerBase playerBase) throws IllegalStateException {
if(sg != null) return;
throw new IllegalStateException("Hiba! Te hogy kerültél a falba?");

View File

@ -1,6 +1,7 @@
package cicaprojekt;
public class ZPM implements Pickable {
@Override
public void pick() {
}