From 171df0cebd41bb44ef7d528785e63c38ab856aac Mon Sep 17 00:00:00 2001 From: Noah Munz Date: Sat, 4 Dec 2021 16:08:31 +0100 Subject: [PATCH] removed minimap and reddot because they were not finished/working --- .gitignore | 4 +++ .../play/game/arpg/actor/ARPGPlayer.java | 28 ++++++++++--------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index faf0fb7..6c6bc29 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ records/ pathBashGit.txt out +*.class +*.jar +*.exe +res/META-INF diff --git a/java/ch/epfl/cs107/play/game/arpg/actor/ARPGPlayer.java b/java/ch/epfl/cs107/play/game/arpg/actor/ARPGPlayer.java index 3fd0635..43d6bde 100644 --- a/java/ch/epfl/cs107/play/game/arpg/actor/ARPGPlayer.java +++ b/java/ch/epfl/cs107/play/game/arpg/actor/ARPGPlayer.java @@ -78,9 +78,9 @@ public class ARPGPlayer extends Player implements InventoryItem.Holder, DamageRe private ARPGPlayerStatusGUI[] hearts; private ARPGPlayerStatusGUI goldDisplay; private ARPGPlayerStatusGUI[] goldCountDisplay; - private ARPGPlayerStatusGUI miniMap; + //private ARPGPlayerStatusGUI miniMap; - private ARPGRedDot mapDot; + //private ARPGRedDot mapDot; private boolean dontCutGrass; private boolean isJustCreated; @@ -156,11 +156,13 @@ public ARPGPlayer(Area owner, Orientation orientation, DiscreteCoordinates coord goldCountDisplay = createGoldCount(); setGoldCount(); +/* miniMap = new ARPGPlayerStatusGUI(getMapSpriteName(), new RegionOfInterest(32, 0, 480, 480), 2.3f, true, 10.69f, -2.3f); +*/ - mapDot = new ARPGRedDot(owner, orientation, coordinates); - mapDot.register(); + //mapDot = new ARPGRedDot(owner, orientation, coordinates); + //mapDot.register(); this.state = State.IDLE; this.oldState = State.IDLE; @@ -173,7 +175,7 @@ public ARPGPlayer(Area owner, Orientation orientation, DiscreteCoordinates coord @Override public void update(float deltaTime) { Keyboard keyboard = getOwnerArea().getKeyboard(); - if (!isJustCreated) { mapDot.register(); } + // if (!isJustCreated) { mapDot.register(); } if (!isReading() && !isDead()) { @@ -638,7 +640,7 @@ public void draw(Canvas canvas) { new Vector(-6.5f, -1.5f), 0.6f, 3005).draw(canvas); } else { - miniMap.draw(canvas); + //miniMap.draw(canvas); gearStatus.draw(canvas); currentItemStatus.draw(canvas); @@ -679,7 +681,7 @@ private void setIcon() { * Update the mini map by updating the name/path of the Sprite of the miniMap for the currentArea */ private void setMiniMap() { - miniMap.setSpriteName(getMapSpriteName()); + //miniMap.setSpriteName(getMapSpriteName()); } /** @@ -774,10 +776,10 @@ public Vulnerability getAttackType() { @Override //Added the concept of mini Map and dot moving on it public void enterArea(Area area, DiscreteCoordinates position) { - mapDot.unregister(); + //mapDot.unregister(); super.enterArea(area, position); setMiniMap(); - mapDot.register(); + //mapDot.register(); } /*********** Inner Private Class ARPGPlayerHandler of ARPGPlayer, handling interaction on the most "specific" level **********/ @@ -908,7 +910,7 @@ private enum State { } /** Inner Class RedDot = Position of the ARPGPlayer on the miniMap */ - private class ARPGRedDot extends Player.RedDot { + /*private class ARPGRedDot extends Player.RedDot { private Vector anchor; private ImageGraphics display; @@ -918,12 +920,12 @@ private class ARPGRedDot extends Player.RedDot { private float offsetX; private float offsetY; - /** + *//** * ARPGRedDot constructor * @param area (Area): Owner area. Not null * @param orientation (Orientation): Initial orientation of the entity. Not null * @param position (DiscreteCoordinates): Initial position of the entity. Not null - */ + *//* public ARPGRedDot(Area area, Orientation orientation, DiscreteCoordinates position) { super(area, orientation, position); //sprite = new RPGSprite("addedSprites/HPBarRed", 0.25f, 0.25f, ARPGPlayer.this); @@ -971,6 +973,6 @@ public List getCurrentCells() { return ARPGPlayer.this.getCurrentCells(); } - } + }*/ } \ No newline at end of file