summaryrefslogtreecommitdiff
path: root/src/components.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-09 00:38:00 +0100
committertroido <troido@protonmail.com>2020-02-09 00:38:00 +0100
commit624b3a94b498d7410049d2227568534c118a9f7d (patch)
treee8ef65c48e332a8f1c90d97c6aa346baffece394 /src/components.rs
parentb56add981c2f520789b97d1ee6f71dae41e8c900 (diff)
ground is now always up-to-date; view doesn't rebuild whole room
Diffstat (limited to 'src/components.rs')
-rw-r--r--src/components.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/components.rs b/src/components.rs
index 5bd6ddd..277dd01 100644
--- a/src/components.rs
+++ b/src/components.rs
@@ -13,12 +13,11 @@ use super::pos::Pos;
#[derive(Debug, Clone)]
pub struct Position{
- pub pos: Pos,
- pub prev: Option<Pos>
+ pub pos: Pos
}
impl Position {
pub fn new(pos: Pos) -> Position {
- Position{pos, prev: None}
+ Position{pos}
}
}
@@ -58,12 +57,11 @@ pub struct Moved {
#[derive(Component, Debug, Clone)]
#[storage(HashMapStorage)]
pub struct Player {
- pub name: String,
- pub is_new: bool
+ pub name: String
}
impl Player {
pub fn new(name: String) -> Self {
- Self{name, is_new: true}
+ Self{name}
}
}