summaryrefslogtreecommitdiff
path: root/src/playerstate.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-28 15:22:27 +0100
committertroido <troido@protonmail.com>2020-02-28 15:22:27 +0100
commit027b37bf2867820aaf2a013a62d7fa278db1a7b4 (patch)
tree0d59ce42def649cd9919523bf4a102462691ea7c /src/playerstate.rs
parent40e4e9e7a7e2c59a5659d8d4bd2ecfafed967299 (diff)
make player movable
Diffstat (limited to 'src/playerstate.rs')
-rw-r--r--src/playerstate.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/playerstate.rs b/src/playerstate.rs
index e27af1d..01e85fe 100644
--- a/src/playerstate.rs
+++ b/src/playerstate.rs
@@ -6,7 +6,7 @@ use crate::{
componentwrapper::{ComponentWrapper, PreEntity},
PlayerId,
RoomId,
- components::{Visible, Player, Inventory, Health, Fighter, Healing},
+ components::{Visible, Player, Inventory, Health, Fighter, Healing, Movable},
attack::Attack,
Result,
aerr,
@@ -117,7 +117,8 @@ impl PlayerState {
}),
ComponentWrapper::Health(Health{health: self.health, maxhealth: self.maximum_health}),
ComponentWrapper::Fighter(Fighter{attack: Attack::new(5), cooldown: 8}),
- ComponentWrapper::Healing(Healing{delay: 50, health: 1, next_heal: None})
+ ComponentWrapper::Healing(Healing{delay: 50, health: 1, next_heal: None}),
+ ComponentWrapper::Movable(Movable{cooldown: 2})
]
}
}