summaryrefslogtreecommitdiffstats
path: root/src/state.rs
diff options
context:
space:
mode:
authorRaymond Hogenson <rhogenson@posteo.net>2018-08-22 16:54:43 -0400
committerRaymond Hogenson <rhogenson@posteo.net>2018-08-22 16:54:43 -0400
commitb9a6da7ccabb972074f09d686dc78f9643accfac (patch)
treef12b13003142571c07909b354fa1f9e6e2155566 /src/state.rs
parentPlay a better song (diff)
downloadstallman-shooter-b9a6da7ccabb972074f09d686dc78f9643accfac.tar.zst
Make taking injuries more flexible
I've just moved it into the Enemy trait, because I was planning on having Bill move around when he got hit, but it didn't look good.
Diffstat (limited to 'src/state.rs')
-rw-r--r--src/state.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs
index 820c1e4..bf62f51 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -76,6 +76,7 @@ pub trait Enemy<T>: Drawable {
fn act(&mut self, count: u64) -> Vec<T>;
fn health(&self) -> f64;
fn set_health(&mut self, health: f64);
+ fn injure(&mut self, damage: f64);
}
pub struct State<T, U> {