public Tile() {
      passable = true;

      if (SystemHelper.debug) {
        viewable = true;
      } else {
        viewable = false;
      } // false -> Sichtbarkeit einschränken		//jedes Tile erhält nocht die Eigenschaft der
        // Sichtbarkeit

      face = ColoredChar.create('.');
      actors = new HashSet<Actor>();
    }
Exemple #2
0
  /**
   * Legt zu allen [-Dooractern zugehörige ]-Dooractor an, wenn ] rechts neben [ steht.
   *
   * @param world Level, in dem man sich befindet (und wo die [-Dooractor sind und auch die neuen
   *     hinsollen).
   */
  public static void completeDoors(World world) {
    Door[] doors = world.getActors(Door.class).toArray(new Door[0]);
    for (int i = 0; i < doors.length; i++) {
      Door door = doors[i];
      Coordinate coordinate = door.getDestination().getCoordinate();

      int x = door.x() + 1; // x-Koordinate des rechten Teils der Tür
      int y = door.y(); // y-Koordinate des rechten Teils der Tür
      world.addActor(new Door(door.getDestination().getLevelEnum(), coordinate), x, y);

      Actor door_rightPart = world.getActorAt(Door.class, x, y);
      door_rightPart.setFace(ColoredChar.create(']'));
    }
  }
Exemple #3
0
 public Door(LevelEnum doorDestinationMap, int destinationX, int destinationY, char character) {
   this(
       new Location(doorDestinationMap, new Coordinate(destinationX, destinationY)),
       ColoredChar.create(character));
 }
Exemple #4
0
 public Door(LevelEnum doorDestinationMap, Coordinate coordinate, char character) {
   this(new Location(doorDestinationMap, coordinate), ColoredChar.create(character));
 }
Exemple #5
0
 public Door(Location doorDestination, char character) {
   super(ColoredChar.create(character));
   this.doorDestination = doorDestination;
 }
Exemple #6
0
 public Door(Location doorDestination) {
   super(ColoredChar.create('['));
   this.doorDestination = doorDestination;
 }