complete all letters and numbers button new position and add start button
This commit is contained in:
@@ -52,8 +52,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
sunScalePlus = 0.15;
|
||||
sunWidth = 70;
|
||||
sunHeight = 70;
|
||||
|
||||
animatedVideoScale = 0.57;
|
||||
animatedFHeight = 32;
|
||||
helpButtonHeight = customHeight / 1.1;
|
||||
helpButtonWidth = customWidth / 2 + 10;
|
||||
|
||||
startButtonHeight = customHeight / 1.1;
|
||||
startButtonWidth = customWidth / 2 - 100;
|
||||
} else{
|
||||
cloudeSize = 500;
|
||||
cloudHeight = 250;
|
||||
@@ -66,8 +71,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
sunScalePlus = 0.25;
|
||||
sunWidth = 200;
|
||||
sunHeight = 100;
|
||||
|
||||
animatedVideoScale = 0.65;
|
||||
animatedFHeight = 20;
|
||||
helpButtonHeight = customHeight / 2 + 40;
|
||||
helpButtonWidth = customWidth / 1.32;
|
||||
|
||||
startButtonHeight = customHeight / 2 - 20;
|
||||
startButtonWidth = customWidth / 1.32;
|
||||
}
|
||||
// let hideButton;
|
||||
|
||||
@@ -189,7 +199,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
const baseFontSize = 20;
|
||||
const responsiveFontSize = (window.innerWidth / 480) * baseFontSize;
|
||||
const descrptText = this.add.text(screenCenterX, 90, 'Let`s learn how to write letter : f', { font: `${responsiveFontSize}px quicksand`, fill: '#7c4c23', fontWeight : 'bold'}).setOrigin(0.5);
|
||||
const animatedLetter = this.add.video(customWidth / 2 , customHeight / 2 + animatedFHeight, 'animatedF').setDepth(2).setScale(0.73);
|
||||
const animatedLetter = this.add.video(customWidth / 2 , customHeight / 2 + animatedFHeight, 'animatedF').setDepth(2).setScale(animatedVideoScale);
|
||||
|
||||
// Play the video
|
||||
animatedLetter.play();
|
||||
@@ -206,11 +216,11 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let textX, textY;
|
||||
|
||||
firstLayer = this.add.image(customWidth / 2 + 15, customHeight / 2 + letterHeight, 'layer1').setScale(letterScale);
|
||||
textX = isMobile ? customWidth / 4 : customWidth * 0.75;
|
||||
textX = isMobile ? customWidth / 6 : customWidth * 0.75;
|
||||
textY = isMobile ? customHeight / 5 : customHeight / 2.4;
|
||||
const firstTextLayer = this.add.text(textX, textY, '1. Hook Down',{ font: '700 40px quicksand', fill: '#05b3a4'});
|
||||
const audioOneAudio = this.sound.add('audioOne');
|
||||
audioOneAudio.play();
|
||||
// audioOneAudio.play();
|
||||
firstLayer.setDepth(1);
|
||||
firstLayer.setAlpha(0.5);
|
||||
firstLayer.setInteractive({ draggable: true });
|
||||
@@ -291,6 +301,25 @@ import Layout from "../../layouts/Layout.astro";
|
||||
graphics.lineTo(pointer.x, pointer.y);
|
||||
graphics.strokePath();
|
||||
});
|
||||
let startButton = this.add.text(startButtonWidth, startButtonHeight, "Start", {
|
||||
font: '900 24px Quicksand',
|
||||
fill: '#05b3a4',
|
||||
backgroundColor : '#7c4c23',
|
||||
padding: {x: 20, y: 10},
|
||||
shadow: {
|
||||
offsetX : 2,
|
||||
offsetY : 2,
|
||||
color: '#000',
|
||||
blur: 5,
|
||||
fill: true
|
||||
}
|
||||
})
|
||||
firstTextLayer.setVisible(false);
|
||||
startButton.setInteractive().on('pointerdown', () => {
|
||||
audioOneAudio.play();
|
||||
firstTextLayer.setVisible(true);
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function update() {
|
||||
|
||||
Reference in New Issue
Block a user