diff options
author | HampusM <hampus@hampusmat.com> | 2024-02-26 20:05:27 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-02-26 20:16:27 +0100 |
commit | 815d04da602c58ed8b13eeb612fe73180204039d (patch) | |
tree | c3703e598656c070edbc271ccaa9117e071d6d4f /ecs/examples/multiple_queries.rs | |
parent | 1019924a29527eba2c8ec8bd976ece6ed76075b0 (diff) |
fix(ecs): make Component trait not automatic & add derive macro
Diffstat (limited to 'ecs/examples/multiple_queries.rs')
-rw-r--r-- | ecs/examples/multiple_queries.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ecs/examples/multiple_queries.rs b/ecs/examples/multiple_queries.rs index a4a5d2d..4f4198a 100644 --- a/ecs/examples/multiple_queries.rs +++ b/ecs/examples/multiple_queries.rs @@ -1,18 +1,21 @@ use std::fmt::Display; -use ecs::{Query, World}; +use ecs::{Component, Query, World}; +#[derive(Component)] struct Health { health: u32, } +#[derive(Component)] enum AttackStrength { Strong, Weak, } +#[derive(Component)] struct EnemyName { name: String, |