demo reset
This commit is contained in:
@@ -40,6 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let graphics;
|
||||
let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let animatedLetter;
|
||||
let gameStartTime = "stat timr here";
|
||||
|
||||
if(isMobile){
|
||||
@@ -234,6 +235,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
});
|
||||
hideButton.setInteractive().on('pointerdown', () => {
|
||||
animatedLetter.stop();
|
||||
isDemoButtonClicked = false;
|
||||
firstScreen.setVisible(false);
|
||||
hideButton.setVisible(false); // Hide the "Hide" button
|
||||
@@ -258,6 +260,8 @@ import Layout from "../../layouts/Layout.astro";
|
||||
});
|
||||
|
||||
demoButton.setInteractive().on('pointerdown', () => {
|
||||
animatedLetter.setCurrentTime(0);
|
||||
animatedLetter.play(true);
|
||||
graphics.setVisible(false);
|
||||
firstScreen.setVisible(true);
|
||||
demoButton.setVisible(false); // Hide the "Demo" button
|
||||
@@ -270,10 +274,10 @@ 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 number : 0', { font: `${responsiveFontSize}px quicksand`, fill: '#7c4c23', fontWeight : 'bold'}).setOrigin(0.5);
|
||||
const animatedLetter = this.add.video(customWidth / 2 , customHeight / 2 + animated0Height, 'animated0').setDepth(2).setScale(animated0videoScale);
|
||||
|
||||
animatedLetter = this.add.video(customWidth / 2 , customHeight / 2 + animated0Height, 'animated0').setDepth(2).setScale(animated0videoScale);
|
||||
animatedLetter.setLoop(true);
|
||||
// Play the video
|
||||
animatedLetter.play();
|
||||
// animatedLetter.play();
|
||||
animatedLetter.setVisible(false);
|
||||
|
||||
// You can set additional properties for the video, such as loop and mute:
|
||||
@@ -301,8 +305,6 @@ import Layout from "../../layouts/Layout.astro";
|
||||
// Add these variables to keep track of start points
|
||||
let firstDragStartPoint = { x: 0, y: 0 };
|
||||
|
||||
// ...
|
||||
|
||||
// Add this code for firstLayer
|
||||
firstLayer.on('dragstart', (pointer) => {
|
||||
firstDragStartPoint.x = pointer.x;
|
||||
|
||||
Reference in New Issue
Block a user