/*-------------------------------------------------------------------------*/ public java.util.List<MazeEvent> execute(Maze maze, Point tile, Point previousTile, int facing) { if (preScript != null && !State.EMPTY.equalsIgnoreCase(MazeVariables.get(this.mazeVariable))) { return preScript.getEvents(); } else { return null; } }
/*-------------------------------------------------------------------------*/ public java.util.List<MazeEvent> handlePlayerAction( Maze maze, Point tile, int facing, int playerAction) { if (playerAction != PlayerAction.LOCKS) { return null; } if (State.EMPTY.equalsIgnoreCase(MazeVariables.get(this.mazeVariable))) { return null; } maze.encounterChest(this); return null; }
/*-------------------------------------------------------------------------*/ public void initialise(Maze maze, Point tile, int tileIndex) { if (!State.EMPTY.equalsIgnoreCase(MazeVariables.get(this.mazeVariable))) { engineObject.setTileIndex(tileIndex); maze.addObject(engineObject); } }