From 613952f918b8d72a3e397dc46be309b2320c6ad0 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 23 Feb 2020 21:25:36 +0100 Subject: entities can be attacked --- src/attack.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/attack.rs (limited to 'src/attack.rs') diff --git a/src/attack.rs b/src/attack.rs new file mode 100644 index 0000000..a0b8b99 --- /dev/null +++ b/src/attack.rs @@ -0,0 +1,17 @@ + +use specs::Entity; + +#[derive(Debug, Clone, Default)] +pub struct Attack { + pub damage: i64, + pub attacker: Option +} + +impl Attack { + pub fn new(damage: i64) -> Self { + Self { + damage, + attacker: None + } + } +} -- cgit