Skip to content
Rodrigo Braz Monteiro edited this page Apr 2, 2018 · 2 revisions

Overview

Messages can be sent from any system to any entity. Any other system can then capture that message, provided that:

  1. It has the recipient entity in its main family
  2. 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.

Declaration

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
Clone this wiki locally