From 7dea12e90ab6b802887145c5847759551ffd9b22 Mon Sep 17 00:00:00 2001 From: 16nlyons <16nlyons@hs15mathstu20.hiltoncsd.net> Date: Wed, 25 May 2016 09:26:46 -0400 Subject: [PATCH] added constructor to zombie class --- src/tanks/Tanks.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/tanks/Tanks.java b/src/tanks/Tanks.java index 8ad44f2..4b572a2 100644 --- a/src/tanks/Tanks.java +++ b/src/tanks/Tanks.java @@ -81,6 +81,19 @@ public class Tanks */ private class Zombie extends Enemy { + //constructor instanciated fields + public Zombie() + { + super(); + this.spawn(frame); + width = 30; + height = 30; + this.setShape(); + health = 10; + isAlive=true; + } + //uses super to move player if collision then removes zombie and player + //takes damage public void move() { direction = angleToPlayer(p);