Skip to content

Commit

Permalink
Fixed range
Browse files Browse the repository at this point in the history
  • Loading branch information
m4mbo committed Mar 20, 2024
1 parent 726b2dc commit 89d474c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/com/mygdx/Tools/EnemyController.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void update() {
Vector2 enemyPos = enemy.getPosition();
Vector2 playerPos = player.getPosition();

if (MathWizard.inRange(enemyPos.x, playerPos.x, 20 / Constants.PPM)) {
if (MathWizard.inRange(enemyPos.x, playerPos.x, 16 / Constants.PPM)) {
enemy.setMovementState(Constants.MSTATE.HSTILL);
if (MathWizard.inRange(enemyPos.y, playerPos.y, 8 / Constants.PPM)) {
((ArmourGoblin) enemy).attack();
Expand Down

0 comments on commit 89d474c

Please sign in to comment.