Skip to content

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:

  1. Visibility.SERVER -> All the components used by the server
  2. Visibility.CLIENT_ALL -> All the components used by the client
  3. 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 hashmap componentsByVisibility, depending on the Visibility requested
  • getComponents() returns all the components that belongs to an Entity, filtered by the Visibility requested
  • satisfies() returns true only if the requested component class is found on the requested Visibility

<< Back to Server Systems

Get Starting

Requirements

Source Code

Reference

run

Graphics

balance

external documentation

Clone this wiki locally