mirror of
https://github.com/simon987/Much-Assembly-Required-Frontend.git
synced 2025-12-14 23:29:02 +00:00
Added dig animation
This commit is contained in:
@@ -222,9 +222,22 @@ class Cubot extends GameObject {
|
||||
// }
|
||||
}
|
||||
|
||||
// if (this.action == Action.DIGGING) {
|
||||
// //TODO dig animation
|
||||
// }
|
||||
if (this.action == Action.DIGGING) {
|
||||
switch (this.direction) {
|
||||
case Direction.NORTH:
|
||||
this.animations.play("dig_n", 60);
|
||||
break;
|
||||
case Direction.SOUTH:
|
||||
this.animations.play("dig_s", 60);
|
||||
break;
|
||||
case Direction.EAST:
|
||||
this.animations.play("dig_e", 60);
|
||||
break;
|
||||
case Direction.WEST:
|
||||
this.animations.play("dig_w", 60);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.updateDirection();
|
||||
this.updateHologram(json.holoMode, json.holoC, json.holo, json.holoStr);
|
||||
|
||||
Reference in New Issue
Block a user