added projectile system and sample fireball projectile
This commit is contained in:
@@ -5,6 +5,7 @@ import de.miaurizius.jgame2d.core.enums.Direction;
|
||||
import de.miaurizius.jgame2d.core.GamePanel;
|
||||
import de.miaurizius.jgame2d.core.Utility;
|
||||
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||
import de.miaurizius.jgame2d.entity.projectile.Projectile;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
@@ -59,14 +60,18 @@ public class Entity {
|
||||
public int exp;
|
||||
public int nextLevelExp;
|
||||
public int coins;
|
||||
public int maxMana;
|
||||
public int mana;
|
||||
public Entity currentWeapon;
|
||||
public Entity currentShield;
|
||||
public Projectile projectile;
|
||||
|
||||
// ITEM ATTRIBUTES
|
||||
public EntityType.WeaponType weaponType;
|
||||
public int attackValue;
|
||||
public int defenseValue;
|
||||
public String description;
|
||||
public int useCost;
|
||||
|
||||
public Entity(GamePanel panel) {
|
||||
this.panel = panel;
|
||||
@@ -187,7 +192,6 @@ public class Entity {
|
||||
if(dyingCount > incr*6 && dyingCount <= incr*7) changeOpacity(graphics2d, 0f);
|
||||
if(dyingCount > incr*7 && dyingCount <= incr*8) changeOpacity(graphics2d, 1f);
|
||||
if(dyingCount > incr*8) {
|
||||
dying = false;
|
||||
alive = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user