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>(); }
/** * 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(']')); } }
public Door(LevelEnum doorDestinationMap, int destinationX, int destinationY, char character) { this( new Location(doorDestinationMap, new Coordinate(destinationX, destinationY)), ColoredChar.create(character)); }
public Door(LevelEnum doorDestinationMap, Coordinate coordinate, char character) { this(new Location(doorDestinationMap, coordinate), ColoredChar.create(character)); }
public Door(Location doorDestination, char character) { super(ColoredChar.create(character)); this.doorDestination = doorDestination; }
public Door(Location doorDestination) { super(ColoredChar.create('[')); this.doorDestination = doorDestination; }