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

Overview

Services are user-defined classes that Systems can access. They can be used as "loopholes" around the ECS system (e.g. to allow systems to talk directly to each other), or to allow systems to access game data which is stored outside the ECS.

Declaration

Services are declared in YAML like other custom types:

type:
  name: InputService
  include: "src/services/input_service.h"

Implementation

Implementation of services is entirely up to the user. The only requirement is that they must extend Halley::Service. They can then be accessed by systems by declaring the system as needing that service, see Systems for more details.

Clone this wiki locally