Skip to content
Snippets Groups Projects
Commit 6ef9c245 authored by jeremy.gobet's avatar jeremy.gobet
Browse files

Updated deps and fixed compilation error

parent 1c19b79d
No related branches found
No related tags found
No related merge requests found
// https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.GameObject.html
import GameObject = Phaser.GameObjects.GameObject;
export default class Bricks extends Phaser.GameObjects.GameObject {
group: Phaser.Physics.Arcade.StaticGroup;
......@@ -19,14 +21,12 @@ export default class Bricks extends Phaser.GameObjects.GameObject {
}
reset() {
this.group.children.each((brick: Phaser.Physics.Arcade.Image) => {
https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Sprite.html#enableBody__anchor
this.group.children.entries.forEach((brick: Phaser.Physics.Arcade.Image) => {
brick.enableBody(false, 0, 0, true, true);
});
})
}
hitBrick(ball: Phaser.Physics.Arcade.Image, brick: Phaser.Physics.Arcade.Image) {
// https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Sprite.html#disableBody__anchor
brick.disableBody(true, true);
if (this.group.countActive() === 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment