Hitting !!

This commit is contained in:
2026-09-30 15:41:30 -03:00
parent 3af5f6e54b
commit 5e2b415f5c
9 changed files with 82 additions and 7 deletions
+7
View File
@@ -100,6 +100,13 @@ export class MultiPlayerGameMode {
attack(entity: Entity) {
this.client.player.send_position_now();
this.client.connection.send({ type: "attack_entity", id: entity.id });
this.client.player.last_attack = performance.now();
}
// left click on nothing: a swing at the air, which uses up the attack cooldown like an attack
swing() {
this.client.connection.send({ type: "swing" });
this.client.player.last_attack = performance.now();
}
// right click on nothing