Dev 1 2023-09-15 16:41:05 +05:30
parent ae955c0229
commit 31e5c36501
1 changed files with 11 additions and 13 deletions

View File

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