24 lines
511 B
JavaScript
24 lines
511 B
JavaScript
/*
|
|
* Copyright (c) 2020. Pascal Syma <pascal@syma.dev>
|
|
* All rights reserved.
|
|
*/
|
|
|
|
import Hitbox from "./Hitbox";
|
|
|
|
export default class AttackA extends Hitbox {
|
|
|
|
constructor(player) {
|
|
super(player, 5);
|
|
|
|
this.body.setSize(42, 20, true);
|
|
this.body.setOffset(1, 8);
|
|
}
|
|
|
|
start() {
|
|
this.setData('active', true);
|
|
this.player.play('attack_a', true)
|
|
.once('animationcomplete', () => {
|
|
this.setData('active', false)
|
|
});
|
|
}
|
|
} |