diff options
| author | troido <troido@protonmail.com> | 2020-01-31 00:51:48 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-01-31 00:51:48 +0100 |
| commit | 5e414fb932eee5aa90d2181cada3c6cd32e4ec09 (patch) | |
| tree | 8d9fd198525e0c52fcd43e03215d3a377d84d97c /src/components.rs | |
| parent | 286be37225b5de1fb438db0a4029fd391b35c13e (diff) | |
systems can create entities (sort of)
Diffstat (limited to 'src/components.rs')
| -rw-r--r-- | src/components.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components.rs b/src/components.rs index c72ba61..aae6453 100644 --- a/src/components.rs +++ b/src/components.rs @@ -2,7 +2,7 @@ use std::ops; use specs::{ - VecStorage, + DenseVecStorage, Component }; @@ -11,7 +11,6 @@ use super::util::clamp; #[derive(Component, Debug, Hash, PartialEq, Eq, Clone, Copy)] -#[storage(VecStorage)] pub struct Position { pub x: i32, pub y: i32 @@ -43,16 +42,18 @@ impl Position { } #[derive(Component, Debug, Clone)] -#[storage(VecStorage)] pub struct Visible { pub sprite: String, pub height: f32 } #[derive(Component, Debug)] -#[storage(VecStorage)] pub struct Controller(pub Control); #[derive(Component, Debug)] -#[storage(VecStorage)] pub struct Blocking; + +#[derive(Component, Debug)] +pub struct Played { + pub name: String +} |
