-
Notifications
You must be signed in to change notification settings - Fork 163
Messages
Rodrigo Braz Monteiro edited this page Apr 2, 2018
·
2 revisions
Messages can be sent from any system to any entity. Any other system can then capture that message, provided that:
- It has the recipient entity in its main family
- It has registered itself to receive that type of message
Typically, you can have multiple systems sending the same type of message, but you usually only want one system receiving each type of message.
Messages allow for an efficient way for systems to communicate with each other about events happening regarding entities, such as collisions.
Messages have the same syntax as Components, see their documentation for more information. The only difference is that they are labelled message
instead. For example:
message:
name: CameraShake
members:
- offset: 'Halley::Vector2f'
- duration: float