Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
KennyLiang2302 committed May 20, 2023
2 parents 2b50dbd + 77ed687 commit 7443a24
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 5 deletions.
Binary file modified assets/images/villager/Village1_Down_Attack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/Village1_Down_Walking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/Village1_Left_Attacking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/Village1_Left_Walking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/Village1_Right_Attacking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/Village1_Right_Walking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/Village1_Up_Attacking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/Village1_Up_Walking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/idle-b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/villager/idle-f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/jsons/enemies.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"texture": {
"name": "idle-r",
"origin": [
247,
350,
36
],
"scale": 0.3
Expand Down
Binary file modified assets/screens/pause-screen/pause_editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions core/src/infinityx/lunarhaze/controllers/EnemyState.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void update(EnemyController entity) {

//if in stealth just walk towards target and attack if close enough
if (!entity.getEnemy().isInBattle()) {
if (targetDst <= entity.getEnemy().getAttackRange() && entity.getAttackHandler().canStartNewAttack()) {
if (targetDst <= entity.getEnemy().getAttackRange() - 0.1f && entity.getAttackHandler().canStartNewAttack()) {
entity.getStateMachine().changeState(ATTACK);
return;
}
Expand All @@ -245,7 +245,7 @@ public void update(EnemyController entity) {
entity.time = 0;
}
} else {
if (targetDst <= entity.getEnemy().getAttackRange() && entity.getAttackHandler().canStartNewAttack()) {
if (targetDst <= entity.getEnemy().getAttackRange() - 0.1f && entity.getAttackHandler().canStartNewAttack()) {
entity.getStateMachine().changeState(ATTACK);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/infinityx/lunarhaze/models/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ public void draw(GameCanvas canvas, Vector2 pos, boolean editor) {
}
} else {
// Draw any out of bounds tiles close to player
for (int i = worldToBoardX(pos.x) - 12; i < worldToBoardX(pos.x) + 12; i++) {
for (int j = worldToBoardY(pos.y) - 12; j < worldToBoardY(pos.y) + 12; j++) {
for (int i = worldToBoardX(pos.x) - 13; i < worldToBoardX(pos.x) + 13; i++) {
for (int j = worldToBoardY(pos.y) - 13; j < worldToBoardY(pos.y) + 13; j++) {
if (!inBounds(i, j)) {
drawTile(i, j, canvas, pos, false);
}
Expand Down

0 comments on commit 7443a24

Please sign in to comment.