started inventory saving
This commit is contained in:
@@ -106,8 +106,8 @@ public class EventHandler {
|
|||||||
panel.gameState = GameState.DIALOGUE;
|
panel.gameState = GameState.DIALOGUE;
|
||||||
panel.player.attackCancel = true;
|
panel.player.attackCancel = true;
|
||||||
panel.playSE(2);
|
panel.playSE(2);
|
||||||
panel.ui.currentDialogue = "You drank the holy water.\nYour life has been recovered!\nYou progress has been saved.";
|
panel.ui.currentDialogue = "You saved your progress!";
|
||||||
panel.player.life = panel.player.maxLife;
|
//panel.player.life = panel.player.maxLife;
|
||||||
canTouchEvent = false;
|
canTouchEvent = false;
|
||||||
panel.assetSetter.setMonster();
|
panel.assetSetter.setMonster();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public class KeyHandler implements KeyListener {
|
|||||||
System.out.printf("Loading config...%n");
|
System.out.printf("Loading config...%n");
|
||||||
try {
|
try {
|
||||||
panel.config.load();
|
panel.config.load();
|
||||||
|
panel.saveLoad.load();
|
||||||
panel.gameState = GameState.PLAY;
|
panel.gameState = GameState.PLAY;
|
||||||
panel.playMusic(0);
|
panel.playMusic(0);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import java.awt.image.BufferedImage;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Objects;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ public class Entity {
|
|||||||
public Entity currentShield;
|
public Entity currentShield;
|
||||||
public Entity currentLight;
|
public Entity currentLight;
|
||||||
public Projectile projectile;
|
public Projectile projectile;
|
||||||
public ArrayList<Entity> inventory = new ArrayList<>();
|
public List<Entity> inventory = new ArrayList<>();
|
||||||
public final int maxInvSize = 20;
|
public final int maxInvSize = 20;
|
||||||
|
|
||||||
// ITEM ATTRIBUTES
|
// ITEM ATTRIBUTES
|
||||||
|
|||||||
Reference in New Issue
Block a user