summaryrefslogtreecommitdiff
path: root/src/playerstate.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-03-01 22:28:02 +0100
committertroido <troido@protonmail.com>2020-03-01 22:28:02 +0100
commit6a7a74e6878ff04e61e6ef21a922e314b9bab271 (patch)
treeb26015955f50856052153019969f7bee8d1cfbd3 /src/playerstate.rs
parentc846e929a88837094d7a5383a306df1fec56c333 (diff)
use generics for message components
Diffstat (limited to 'src/playerstate.rs')
-rw-r--r--src/playerstate.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/playerstate.rs b/src/playerstate.rs
index 01e85fe..79c7b31 100644
--- a/src/playerstate.rs
+++ b/src/playerstate.rs
@@ -6,8 +6,7 @@ use crate::{
componentwrapper::{ComponentWrapper, PreEntity},
PlayerId,
RoomId,
- components::{Visible, Player, Inventory, Health, Fighter, Healing, Movable},
- attack::Attack,
+ components::{Visible, Player, Inventory, Health, Fighter, Healing, Movable, AttackMessage},
Result,
aerr,
Sprite,
@@ -116,7 +115,7 @@ impl PlayerState {
capacity: self.inventory_capacity
}),
ComponentWrapper::Health(Health{health: self.health, maxhealth: self.maximum_health}),
- ComponentWrapper::Fighter(Fighter{attack: Attack::new(5), cooldown: 8}),
+ ComponentWrapper::Fighter(Fighter{attack: AttackMessage::new(5), cooldown: 8}),
ComponentWrapper::Healing(Healing{delay: 50, health: 1, next_heal: None}),
ComponentWrapper::Movable(Movable{cooldown: 2})
]