Skip to content

Latest commit

 

History

History
73 lines (54 loc) · 2.67 KB

Manual-Classes.md

File metadata and controls

73 lines (54 loc) · 2.67 KB

Classes

Entities

How to create an entity

Entities are containers with ID and Generation.
ID - unique entity identifier in the world.
Generation - unique entity generation identifier, increase when entity creates from the pool.
GetVersion() - method to return unique version of the entity, increase when entity changed.

Components (IComponent, ICopyable<>, etc.)

How to create a component

Components are storing data. In ME.ECS there are 2 component types: IStructCopyable<> and IStructComponent. IStructCopyable<> could be stored only once. it could store any types (including managed data) and must implement CopyFrom and OnRecycle methods. IStructComponent could store just simple types or StackArray.

Systems (ISystem)

How to create a system

Systems do visual update at the end of the frame and on the ending of every tick.

Features (Feature)

How to create a feature

Features are introduced for grouping systems and modules into one block. Features are ScriptableObjects and could be ordered in Initializer on your scene

Modules (IModule)

How to create a module

Modules do visual update on the beginning of the frame and on the beginning of every tick. Here you can get controller input and create some markers.

Markers (IMarker)

How to create a marker

Markers needed to implement Controller/UI events or something that doesn't exist in game state.



Interfaces

Type Description
ISystem Default System behaviour.
IModule Default Module behaviour.
IAdvanceTick Use this interface in System or Module to get an update every tick.
IAdvanceTickPre Use this interface in System to get an update every tick before IAdvanceTick.
IAdvanceTickPost Use this interface in System to get an update every tick after IAdvanceTick.
ISystemFilter Use this interface in System to get an iteration through the filter.
IAdvanceTickStep Use this interface in System to get an update every X tick.
IUpdate Use this interface in System or Module to get an update every frame in World::Update.
IUpdateLate Use this interface in System to get an update every frame after IUpdate in World::Update.
IUpdatePost Use this interface in System to get an update every frame in World::LateUpdate.


Flow