Added missing override annotations
This commit is contained in:
parent
b02a5756a5
commit
f8eb39d2fb
@ -7,9 +7,11 @@ public class Box implements Pickable, Destroyable {
|
|||||||
public Box() {
|
public Box() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void pick() {
|
public void pick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ public class Field extends cicaprojekt.Tile {
|
|||||||
return boxStack.isEmpty();
|
return boxStack.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onEntry(PlayerBase playerBase) {
|
public void onEntry(PlayerBase playerBase) {
|
||||||
super.onEntry(playerBase);
|
super.onEntry(playerBase);
|
||||||
if (boxStack.size() > 0)
|
if (boxStack.size() > 0)
|
||||||
@ -19,5 +20,6 @@ public class Field extends cicaprojekt.Tile {
|
|||||||
playerBase.pickZPM(this);
|
playerBase.pickZPM(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onExit(PlayerBase playerBase) {}
|
public void onExit(PlayerBase playerBase) {}
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,13 @@ public class Gap extends cicaprojekt.Tile {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onEntry(PlayerBase playerBase) {
|
public void onEntry(PlayerBase playerBase) {
|
||||||
super.onEntry(playerBase);
|
super.onEntry(playerBase);
|
||||||
playerBase.destroy();
|
playerBase.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onExit(PlayerBase playerBase) throws IllegalStateException {
|
public void onExit(PlayerBase playerBase) throws IllegalStateException {
|
||||||
throw new IllegalStateException("Hiba! A szakadékból nem jut ki semmi!");
|
throw new IllegalStateException("Hiba! A szakadékból nem jut ki semmi!");
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,13 @@ public class Gate extends Tile {
|
|||||||
if (this.open) adjacentTile.get(direction).spawnStargate(stargate, direction);
|
if (this.open) adjacentTile.get(direction).spawnStargate(stargate, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onEntry(PlayerBase playerBase) {
|
public void onEntry(PlayerBase playerBase) {
|
||||||
super.onEntry(playerBase);
|
super.onEntry(playerBase);
|
||||||
if (open) playerBase.setCurrentTile(this);
|
if (open) playerBase.setCurrentTile(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onExit(PlayerBase playerBase) throws IllegalStateException {
|
public void onExit(PlayerBase playerBase) throws IllegalStateException {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
throw new IllegalStateException("Hiba! Te hogy kerültél a csukott ajtóba?");
|
throw new IllegalStateException("Hiba! Te hogy kerültél a csukott ajtóba?");
|
||||||
|
@ -18,6 +18,7 @@ public class PlayerBase implements Destroyable {
|
|||||||
return String.format("%s: %s", name, currentTile);
|
return String.format("%s: %s", name, currentTile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
destroyed = true;
|
destroyed = true;
|
||||||
Game.instance.playerBaseDestroyed(this);
|
Game.instance.playerBaseDestroyed(this);
|
||||||
|
@ -30,12 +30,14 @@ public class Wall extends Tile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onEntry(PlayerBase playerBase) {
|
public void onEntry(PlayerBase playerBase) {
|
||||||
super.onEntry(playerBase);
|
super.onEntry(playerBase);
|
||||||
if (sg != null)
|
if (sg != null)
|
||||||
sg.teleport(playerBase);
|
sg.teleport(playerBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onExit(PlayerBase playerBase) throws IllegalStateException {
|
public void onExit(PlayerBase playerBase) throws IllegalStateException {
|
||||||
if(sg != null) return;
|
if(sg != null) return;
|
||||||
throw new IllegalStateException("Hiba! Te hogy kerültél a falba?");
|
throw new IllegalStateException("Hiba! Te hogy kerültél a falba?");
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cicaprojekt;
|
package cicaprojekt;
|
||||||
|
|
||||||
public class ZPM implements Pickable {
|
public class ZPM implements Pickable {
|
||||||
|
@Override
|
||||||
public void pick() {
|
public void pick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user