Skip to content

Commit

Permalink
Fixed animations of icebaby
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyle1 committed Sep 28, 2023
1 parent 57e3075 commit 948eb62
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ public void update() {

switch (iceBabyState) {
case IDLE -> walk(getWalkPos());
case ATK1 -> {
case WALK -> {
if (walkComplete()) {
ATK3();
changeState(iceBabyState.ATK1);
} else {
spawnMob();
}
}
case ATK2, ATK3-> {
case ATK1, ATK2, ATK3-> {
if (animation.isFinished()) {
changeState(iceBabyState.IDLE);
}
Expand All @@ -164,7 +164,7 @@ public void update() {
}

private void walk(Vector2 finalPos) {
changeState(IceBabyTask.STATE.ATK1);
changeState(IceBabyTask.STATE.WALK);
isWalking = true;

walkTask = new MovementTask(finalPos);
Expand Down

0 comments on commit 948eb62

Please sign in to comment.