Browse Source

added move method to zombie class

pull/1/head
16nlyons 8 years ago
parent
commit
c8dfa0dd03
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/tanks/Tanks.java

+ 10
- 1
src/tanks/Tanks.java View File

@ -81,7 +81,16 @@ public class Tanks
*/
private class Zombie extends Enemy
{
public void move()
{
direction = angleToPlayer(p);
super.move(-1);
if(this.checkCollision(p))
{
enemy.remove(this);
p.takeDamage();
}
}
}

Loading…
Cancel
Save