This commit is contained in:
dev sp
2024-02-08 15:24:34 +00:00
parent 4864274169
commit c229800e73
6 changed files with 657 additions and 456 deletions

View File

@@ -465,7 +465,7 @@ import Layout from '../../layouts/Layout.astro';
const targetZoneBorders = [];
targetZones.forEach((targetZone) => {
const targetImage = this.add.image(targetZone.x, targetZone.y, targetZone.name).setAlpha(0);
const targetBorder = this.add.image(targetZone.x, targetZone.y, "border").setAlpha(0.2).setScale(borderScale);
const targetBorder = this.add.image(targetZone.x, targetZone.y, "border").setAlpha(0).setScale(borderScale);
targetZoneBorders.push(targetBorder);
targetZone.block = null;
}),
@@ -492,7 +492,8 @@ import Layout from '../../layouts/Layout.astro';
// newBlock.setPosition(targetZone.x - 50, targetZone.y - 50); //backgroundColor:`#FF0000`
const col = counter % 2;
const row = Math.floor(counter / 2);
newBlock.setPosition(targetZone.x - col * (newBlock.width + 10), targetZone.y - row * (newBlock.height + 10));
// newBlock.setPosition(targetZone.x - col * (newBlock.width + 10), targetZone.y - row * (newBlock.height + 10));
newBlock.setPosition(targetZone.x - 50, targetZone.y - 50);
newBlock.disableInteractive();
targetZone.block = newBlock;
droppedBlocks.push(newBlock);
@@ -504,7 +505,7 @@ import Layout from '../../layouts/Layout.astro';
droppedOnTargetZone = true;
targetZoneBorders[targetIndex].setVisible(true);
targetZoneBorders[targetIndex].setAlpha(1);
targetZoneBorders[targetIndex].setAlpha(0);
return;
}
});