added entitys, enemys, bats and custom attack hitboxes for players

added map loading and one-way collision (needs to move to tiled attribute tho)

Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
2020-05-20 11:13:21 +02:00
parent 4a22dbe657
commit a726db1306
22 changed files with 2166 additions and 30 deletions
+24
View File
@@ -0,0 +1,24 @@
/*
* 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, 32, true);
this.body.setOffset(1, -10);
}
start() {
this.setData('active', true);
this.player.play('attack_a', true)
.once('animationcomplete', () => {
this.setData('active', false)
});
}
}