parent
ae955c0229
commit
31e5c36501
|
@ -31,7 +31,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||||
type: Phaser.AUTO,
|
type: Phaser.AUTO,
|
||||||
width: window.innerWidth,
|
width: window.innerWidth,
|
||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
backgroundColor: '#05b3a4',
|
backgroundColor: '#fff',
|
||||||
scale: {
|
scale: {
|
||||||
mode: Phaser.Scale.FIT,
|
mode: Phaser.Scale.FIT,
|
||||||
autoCenter: Phaser.Scale.CENTER_HORIZONTALLY,
|
autoCenter: Phaser.Scale.CENTER_HORIZONTALLY,
|
||||||
|
@ -74,23 +74,22 @@ import Layout from "../../layouts/Layout.astro";
|
||||||
this.add.text(customWidth / 10, 20, data.letter_text, textStyle);
|
this.add.text(customWidth / 10, 20, data.letter_text, textStyle);
|
||||||
const textStyle2 = {font: 'bold 40px quicksand', fill: '#5e17eb',};
|
const textStyle2 = {font: 'bold 40px quicksand', fill: '#5e17eb',};
|
||||||
if(!isMobile){
|
if(!isMobile){
|
||||||
image = this.add.image(customWidth / 4, customHeight / 2, 'letter_img');
|
image = this.add.image(customWidth / 4, customHeight / 2, 'letter_img');
|
||||||
image.setInteractive().setDepth(1).setScale(0.6);
|
image.setInteractive().setDepth(1).setScale(0.6);
|
||||||
letter_img = this.add.image(customWidth / 1.5, customHeight / 2, 'icon_img');
|
letter_img = this.add.image(customWidth / 1.5, customHeight / 2, 'icon_img');
|
||||||
letter_img.setDepth().setScale(0.6);
|
letter_img.setDepth().setScale(0.6);
|
||||||
this.add.text(customWidth / 1.6, customHeight / 1.25, data.icon_name, textStyle2);
|
this.add.text(customWidth / 1.6, customHeight / 1.25, data.icon_name, textStyle2);
|
||||||
} else{
|
} else{
|
||||||
image = this.add.image(customWidth / 2.5, customHeight / 2.5, 'letter_img');
|
image = this.add.image(customWidth / 2.5, customHeight / 2.5, 'letter_img');
|
||||||
image.setInteractive().setDepth(1).setScale(0.3);
|
image.setInteractive().setDepth(1).setScale(0.3);
|
||||||
letter_img = this.add.image(customWidth / 1.35, customHeight / 2 + 100 , 'icon_img');
|
letter_img = this.add.image(customWidth / 1.35, customHeight / 2 + 100 , 'icon_img');
|
||||||
letter_img.setDepth().setScale(0.3);
|
letter_img.setDepth().setScale(0.3);
|
||||||
this.add.text(customWidth / 2, customHeight / 1.3, data.icon_name, textStyle2);
|
this.add.text(customWidth / 2, customHeight / 1.3, data.icon_name, textStyle2);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error fetching initial data:', error);
|
console.error('Error fetching initial data:', error);
|
||||||
});
|
});
|
||||||
|
|
||||||
graphics = this.add.graphics();
|
graphics = this.add.graphics();
|
||||||
if(!isMobile){
|
if(!isMobile){
|
||||||
graphics.lineStyle(50, 0x5e17eb);
|
graphics.lineStyle(50, 0x5e17eb);
|
||||||
|
@ -98,7 +97,6 @@ import Layout from "../../layouts/Layout.astro";
|
||||||
graphics.lineStyle(25, 0x5e17eb);
|
graphics.lineStyle(25, 0x5e17eb);
|
||||||
}
|
}
|
||||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50 , 'topLogo');
|
this.add.image(customWidth / 2 * 1.6 - 0.5, 50 , 'topLogo');
|
||||||
|
|
||||||
this.input.on('pointerdown', function (pointer) {
|
this.input.on('pointerdown', function (pointer) {
|
||||||
if (image.getBounds().contains(pointer.x, pointer.y)) {
|
if (image.getBounds().contains(pointer.x, pointer.y)) {
|
||||||
// Start dragging only if the pointer is over the image
|
// Start dragging only if the pointer is over the image
|
||||||
|
|
Loading…
Reference in New Issue