summaryrefslogtreecommitdiff
path: root/src/components.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.rs')
-rw-r--r--src/components.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/components.rs b/src/components.rs
index 7517af9..34dbe97 100644
--- a/src/components.rs
+++ b/src/components.rs
@@ -2,6 +2,7 @@
use specs::{
DenseVecStorage,
VecStorage,
+ HashMapStorage,
FlaggedStorage,
Component
};
@@ -41,13 +42,17 @@ pub struct Controller(pub Control);
pub struct Blocking;
#[derive(Component, Debug, Clone)]
-pub struct Played {
+pub struct Floor;
+
+#[derive(Component, Debug, Clone)]
+#[storage(HashMapStorage)]
+pub struct Player {
pub name: String,
pub is_new: bool
}
-impl Played {
- pub fn new(name: String) -> Played {
- Played{name, is_new: true}
+impl Player {
+ pub fn new(name: String) -> Self {
+ Self{name, is_new: true}
}
}