package unit;

import scenery.Scenery;

import gUI.PirateNinjaBoxerPanel;
import gUI.Camera;
import coords.Coords;
import buntil.ILoader;

public class Gunner extends Enemy{
	
	public static String[] images = {"GunnerWalk1.png", "GunnerWalk2.png", "GunnerWalk3.png"}; 
	public String status = null;
	
	public Gunner(Coords placementa, Coords endPath, PirateNinjaBoxerPanel aP)
	{
		
		super(placementa, "Gunner", ILoader.iL(images), endPath);
	}
	public void move() 
	{
		super.move();
		try
		{
		if(path[path.length-1] == placement)
		{
			if(status == "MovingRight")
			{
				status = "StoppedRight";
			}else if (status == "MovingLeft")
			{
				status = "StoppedLeft";
			}
			
		}else if(path[path.length-1].getX() >= placement.getX())
		{
			status = "MovingRight";
		}
		else if(path[path.length-1].getX() <= placement.getX())
		{
			status = "MovingLeft";
		}
		}catch(Exception e)
		{
			
		}
	}
}
