@@ -0,0 +1,1947 @@
+//Created by Ammad Hashmi %5BSyrobia%5D www.syrobia.github.io%0A//package com.github.syrobia.tankinvaders.entity;%0A%0Aimport java.awt.Graphics;%0Aimport java.awt.Rectangle;%0A%0A//This entity will represent all actors%0Apublic abstract class Entity %7B%0A   //x location%0A%09protected double x;%0A%09//y location%0A%09protected double y;%0A%09//this.sprite stufff%0A%09protected Sprite sprite;%0A%09//speeed on x-axis(pixels/sec) %0A%09protected double dx;%0A%09//speeed on y-axis(pixels/sec) */%0A%09protected double dy;%0A%09//square for coollecting and detecting collosions (player) %0A%09private Rectangle me = new Rectangle();%0A%09// enemy square for collosions%0A%09private Rectangle him = new Rectangle();%0A%09%0A%09//Construct a entity based on a sprite image and a location.%0A%09%0A%09public Entity(String ref,int x,int y) %7B%0A%09%09this.sprite = SpriteStore.get().getSprite(ref);%0A%09%09this.x = x;%0A%09%09this.y = y;%0A%09%7D%0A%09%0A%09//move alien entities%0A%09public void move(long delta) %7B%0A%09%09// update the location of the entity based on move speeds%0A%0A%09%09x += (delta * dx) / 1000;%0A%09%09y += (delta * dy) / 1000;%0A%09%7D%0A%09%0A%09//horizontal speed of alien entity%0A%09public void setHorizontalMovement(double dx) %7B%0A%09%09this.dx = dx;%0A%09%7D%0A%0A%09//vertical speed%0A%09public void setVerticalMovement(double dy) %7B%0A%09%09this.dy = dy;%0A%09%7D%0A%09%0A%09//return horizontal speed%0A%09public double getHorizontalMovement() %7B%0A%09%09return dx;%0A%09%7D%0A%0A%09//return vertical speed%0A%09public double getVerticalMovement() %7B%0A%09%09return dy;%0A%09%7D%0A%09%0A%09//draw entity%0A%09public void draw(Graphics g) %7B%0A%09%09sprite.draw(g,(int) x,(int) y);%0A%09%7D%0A%09%0A%09//do crap%0A%09public void doLogic() %7B%0A%09%7D%0A%09//x location%0A%09public int getX() %7B%0A%09%09return (int) x;%0A%09%7D%0A%0A   //y location%0A%09public int getY() %7B%0A%09%09return (int) y;%0A%09%7D%0A%09%0A   //collision checker%0A%09public boolean collidesWith(Entity other) %7B%0A%09%09me.setBounds((int) x,(int) y,sprite.getWidth(),sprite.getHeight());%0A%09%09him.setBounds((int) other.x,(int) other.y,other.sprite.getWidth(),other.sprite.getHeight());%0A%0A%09%09return me.intersects(him);%0A%09%7D%0A%09%0A%09//notify collision%0A%09public abstract void collidedWith(Entity other);%0A%7D%0A

Create Entity.java