Skip to content

Commit

Permalink
removed minimap and reddot because they were not finished/working
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Kyrat committed Dec 4, 2021
1 parent 82bca14 commit 171df0c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
records/
pathBashGit.txt
out
*.class
*.jar
*.exe
res/META-INF
28 changes: 15 additions & 13 deletions java/ch/epfl/cs107/play/game/arpg/actor/ARPGPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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()) {

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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());
}

/**
Expand Down Expand Up @@ -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 **********/
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -971,6 +973,6 @@ public List<DiscreteCoordinates> getCurrentCells() {
return ARPGPlayer.this.getCurrentCells();
}
}
}*/

}

0 comments on commit 171df0c

Please sign in to comment.