package com.pqbyte.coherence;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.physics.box2d.World;

public class Enemy extends Person {

  /**
   * The evil enemy that must be destroyed.
   *
   * @param texture The player's texture.
   * @param startX  The starting x-position.
   * @param startY  The starting y-position.
   * @param world   The Box2D world.
   */
  public Enemy(Texture texture, float startX, float startY, World world) {
    super(texture, startX, startY, world);
  }
}

@@ -153,14 +153,139 @@
  %7B%0A%0A
+  private static final int NANOSECONDS_IN_SECOND = 1000000000;%0A%0A  private double lastShotTime = 0;%0A  private Player target;%0A%0A
   /**%0A
-
    *
@@ -575,16 +575,31 @@
 ld world
+, Player target
 ) %7B%0A    
@@ -637,14 +637,346 @@
 world);%0A
+    this.target = target;%0A  %7D%0A%0A  @Override%0A  public void act(float delta) %7B%0A    update(delta);%0A%0A    double currentTime = System.nanoTime();%0A    if (currentTime - lastShotTime %3E NANOSECONDS_IN_SECOND * 0.2) %7B%0A      shoot(target.getX() - getX(), target.getY() - getY());%0A      lastShotTime = currentTime;%0A    %7D%0A%0A    super.act(delta);%0A
   %7D%0A%7D%0A

Add player shooting for Enemy