Hitting !!
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user