-
Notifications
You must be signed in to change notification settings - Fork 38
ComponentSystem
jmpala edited this page Aug 13, 2020
·
2 revisions
PassiveSystem that groups on a hashmap all the components, according to their visibility, made through Reflections.
On creation, the components are added into Map<Visibility, Set<Class<? extends Component>>> componentsByVisibility and divided into 3 sets:
- Visibility.SERVER -> All the components used by the server
- Visibility.CLIENT_ALL -> All the components used by the client
- Visibility.CLIENT_PUBLIC -> All the components that are shared between the server and the client
Also, the following useful methods are provided:
-
getBy()returns all the components classes from the hashmapcomponentsByVisibility, depending on theVisibilityrequested -
getComponents()returns all the components that belongs to an Entity, filtered by theVisibilityrequested -
satisfies()returns true only if the requested component class is found on the requestedVisibility
- IntelliJ
- Windows JDK
- Linux JDK
- Run client and server localhost
- Host a public server
- Import project to IntelliJ