Fixed the astar algoritm and added some comments
This commit is contained in:
parent
c356ddf327
commit
e280861f2d
14 changed files with 776 additions and 1365 deletions
|
|
@ -8,6 +8,11 @@ import ei.game.scene.SelectBox;
|
|||
import ei.game.scene.weapons.Explotion;
|
||||
import ei.game.scene.weapons.WeaponHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jesper Lundin
|
||||
*
|
||||
*/
|
||||
public class CommandCenter extends Building{
|
||||
private SelectBox selectionBox;
|
||||
private Sprite sprite;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ import ei.game.scene.weapons.MachineGun;
|
|||
import ei.game.scene.weapons.Weapon;
|
||||
import ei.game.scene.weapons.WeaponHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jesper Lundin
|
||||
*
|
||||
*/
|
||||
public class APU extends Unit{
|
||||
private SelectBox selectionBox;
|
||||
private Sprite sprite;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ import ei.game.scene.weapons.Explotion;
|
|||
import ei.game.scene.weapons.Weapon;
|
||||
import ei.game.scene.weapons.WeaponHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jesper Lundin
|
||||
*
|
||||
*/
|
||||
public class Bomber extends Unit{
|
||||
private SelectBox selectionBox;
|
||||
private Sprite sprite;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ import ei.game.scene.weapons.Explotion;
|
|||
import ei.game.scene.weapons.Weapon;
|
||||
import ei.game.scene.weapons.WeaponHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jesper Lundin
|
||||
*
|
||||
*/
|
||||
public class Tank extends Unit{
|
||||
private SelectBox selectionBox;
|
||||
private Sprite sprite;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,11 @@ import ei.engine.math.Vector2i;
|
|||
import ei.game.gamestate.InGameState;
|
||||
import ei.game.scene.Map;
|
||||
|
||||
/**
|
||||
* Handles the bomber units webon
|
||||
* @author Jesper Lundin
|
||||
*
|
||||
*/
|
||||
public class BomberWeapon extends Weapon{
|
||||
private Particles part;
|
||||
private boolean hit;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@ package ei.game.scene.weapons;
|
|||
import ei.engine.effects.Particles;
|
||||
import ei.engine.math.Vector2f;
|
||||
|
||||
/**
|
||||
* @author Jesper Lundin
|
||||
*
|
||||
*/
|
||||
public class CannonBall extends Weapon{
|
||||
|
||||
public CannonBall(Vector2f startPos) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@ package ei.game.scene.weapons;
|
|||
import ei.engine.effects.Particles;
|
||||
import ei.engine.math.Vector2f;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ziver
|
||||
*
|
||||
*/
|
||||
public class Explotion extends Weapon{
|
||||
private Particles part;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@ package ei.game.scene.weapons;
|
|||
import ei.engine.effects.Particles;
|
||||
import ei.engine.math.Vector2f;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jesper Lundin
|
||||
*
|
||||
*/
|
||||
public class MachineGun extends Weapon{
|
||||
|
||||
public MachineGun(Vector2f startPos) {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ import ei.engine.math.Vector2i;
|
|||
import ei.engine.scene.Entity;
|
||||
import ei.game.gamestate.InGameState;
|
||||
import ei.game.scene.Map;
|
||||
|
||||
/**
|
||||
* The weapon class.
|
||||
* @author Jesper Lundin
|
||||
*
|
||||
*/
|
||||
|
||||
public abstract class Weapon {
|
||||
private int range;
|
||||
private int damage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue