Skip to content

EnTT implementation of ecsact runtime & other EnTT + ecsact utilities

License

Notifications You must be signed in to change notification settings

ecsact-dev/ecsact_rt_entt

Repository files navigation

EnTT Ecsact Runtime Implementation

Ecsact runtime built with EnTT.

System Views

In the simplest cases an Ecsact system lines up 1:1 with an EnTT view.

package example;
component Health { f32 value; }
component Invincible;
system Gravity { readwrite Position; exclude Weightless; }
entt::basic_view<entt::entity, entt::get_t<example::Health>, entt::exclude_t<example::Invincible>>

Since adds implies exclude and removes implies include even adds/removes systems are almost 1:1.

package example;
component Health { f32 value; }
component Healing;
action StartHealing { include Health; adds Healing; }
action StopHealing { include Health; removes Healing; }
// EnTT view for StartHealing
entt::basic_view<entt::entity, entt::get_t<example::Health>, entt::exclude_t<example::Healing>>
// EnTT view for StopHealing
entt::basic_view<entt::entity, entt::get_t<example::Health, example::Healing>, entt::exclude_t<>>