From 69a23841600e2714d9926f6678fa98baf25f90aa Mon Sep 17 00:00:00 2001 From: ericnerdo Date: Sun, 24 Apr 2016 22:37:27 +0200 Subject: [PATCH] Wall - finished --- cicaprojekt/Wall.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cicaprojekt/Wall.java b/cicaprojekt/Wall.java index a6eed9e..9dd4949 100644 --- a/cicaprojekt/Wall.java +++ b/cicaprojekt/Wall.java @@ -3,6 +3,9 @@ package cicaprojekt; public class Wall extends Tile { private Stargate sg; + public Wall(){ + super(); + } public void spawnStargate(Stargate stargate, Direction direction) { if(sg == null) @@ -15,16 +18,16 @@ public class Wall extends Tile { sg = null; } - public void onEntry() { + public void onEntry(PlayerBase playerBase) { if(sg == null) { - + return; } else { - + sg.teleport(playerBase.facingDirection); } } - public void onExit() { + public void onExit(PlayerBase playerBase) throws IllegalStateException { throw new IllegalStateException("Hiba! Te hogy kerültél a falba?"); } }