Пример #1
0
 /*-------------------------------------------------------------------------*/
 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;
   }
 }
Пример #2
0
  /*-------------------------------------------------------------------------*/
  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;
  }
Пример #3
0
 /*-------------------------------------------------------------------------*/
 public void initialise(Maze maze, Point tile, int tileIndex) {
   if (!State.EMPTY.equalsIgnoreCase(MazeVariables.get(this.mazeVariable))) {
     engineObject.setTileIndex(tileIndex);
     maze.addObject(engineObject);
   }
 }