Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleWhole committed May 30, 2022
2 parents b98a842 + 8d0e1a3 commit c71555f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/combat/artes/Arte.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void animation(Unit target, Graphics g) {
public void animationOwner(Graphics g) {
if (!finished()) {
this.aniFrame = aniSheet.getSprite(spritesheetX, spritesheetY);
g.drawImage(aniFrame, -owner.getPosition().getX() - (owner.getWidth()/2), owner.getY() + owner.getHeight()*3.5f);
g.drawImage(aniFrame, -owner.getPosition().getX() - (owner.getWidth()/2), owner.getY() + owner.getHeight()*4.3f);
}
}

Expand Down
9 changes: 5 additions & 4 deletions src/entities/units/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,12 @@ protected void drawSprite(Graphics g) { // Draw the entity sprite
public void battleRender(Graphics g, float plrX, float plrY) {
g.drawImage(sprite, -plrX - position.getX(), -plrY/2 - position.getY());
g.setColor(new Color(255, 0,0,0.5f));
hitBox.setX(plrX - position.getX() + width/2);
hitBox.setY((-plrY/2) + this.getHeight()*1.6f);
ImageManager.getImage("health").drawCentered(hitBox.getX() + hitBox.getWidth() / 2, hitBox.getY() - this.getHeight() - 30);

hitBox.setX(-plrX - position.getX() + width/3);
hitBox.setY((-plrY/2) - position.getY() + height/4);
ImageManager.getImage("health").drawCentered(hitBox.getX() + hitBox.getWidth() / 3.5f, hitBox.getY() - this.getHeight() / 2 + 15);
g.setColor(Color.white);
DrawUtilities.drawStringCentered(g, String.valueOf(health), hitBox.getX() + hitBox.getWidth() / 2, hitBox.getY() - this.getHeight() - 30);
DrawUtilities.drawStringCentered(g, String.valueOf(health), hitBox.getX() + hitBox.getWidth() / 3.5f, hitBox.getY() - this.getHeight() / 2 + 15);
}

public void addToDeck(Arte<Player> a) {
Expand Down

0 comments on commit c71555f

Please sign in to comment.