-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dungeon: improve readability by replacing implicit filtering (entityS…
…tream) with explicit filtering (filteredEntityStream, both System) (#1564) **fixes #1553** Überarbeitet den Umgang mit dem Entity-Stream in `System#execute`-Methoden, um eine bessere Code-Lesbarkeit zu erreichen. Anmerkung: Durch die gemachten Änderungen kommt es zu Redundanz im Hinblick auf die Filterregeln. Diese werden weiterhin im System gespeichert, können jetzt aber optional als Parameter eigenständig verwendet werden. Wenn sich für das eigenständige Verwenden als Parameter entschieden wird, muss bei Änderungen an den Filtern darauf geachtet werden, diese überall einzutragen (im Konstruktor UND in der Execute-Funktion). Für leichtere Bedienung und Abwärtskompatibilität ist die alte Variante aber weiterhin verfügbar. Änderungen im Überblick: * Umbenennung der Methode `System#entityStream` in `System#filteredEntityStream` * Hinzufügen von parametisierten Varianten der Methode `System#filteredEntityStream` in zwei Geschmacksrichtungen: * Array-Style-Parameter: `filteredEntityStream(final Class<? extends Component>... filterRules)` * Set-Parameter: `filteredEntityStream(Set<Class<? extends Component>> filterRules)` * Tests * Anwenden der Methode `System#filteredEntityStream(final Class<? extends Component>... filterRules)` in den `core`- und `contrib`-Systemen * Kleinere Refactoring-Änderungen (Kommentare, Namen) --------- Co-authored-by: Andre Matutat <andre.matutat@hsbi.de>
- Loading branch information
Showing
16 changed files
with
154 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters