made item buyable
This commit is contained in:
@@ -13,6 +13,7 @@ import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class Entity {
|
||||
@@ -66,6 +67,8 @@ public class Entity {
|
||||
public Entity currentWeapon;
|
||||
public Entity currentShield;
|
||||
public Projectile projectile;
|
||||
public ArrayList<Entity> inventory = new ArrayList<>();
|
||||
public final int maxInvSize = 20;
|
||||
|
||||
// ITEM ATTRIBUTES
|
||||
public EntityType.WeaponType weaponType;
|
||||
@@ -74,6 +77,7 @@ public class Entity {
|
||||
public String description;
|
||||
public int useCost;
|
||||
public int value;
|
||||
public int price;
|
||||
|
||||
public Entity(GamePanel panel) {
|
||||
this.panel = panel;
|
||||
@@ -102,7 +106,7 @@ public class Entity {
|
||||
}
|
||||
|
||||
spriteCounter++;
|
||||
if(spriteCounter > 12) {
|
||||
if(spriteCounter > 24) {
|
||||
if(spriteNum == 1) spriteNum = 2;
|
||||
else if(spriteNum == 2) spriteNum = 1;
|
||||
else spriteNum = 0;
|
||||
|
||||
Reference in New Issue
Block a user