submit user data in all games
This commit is contained in:
@@ -8,8 +8,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
x: isMobile ? 0 : window.innerWidth / 4,
|
||||
y: window.innerHeight / 4,
|
||||
@@ -41,7 +42,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let animatedLetter;
|
||||
let gameStartTime = "stat timr here";
|
||||
let scoreTotal = 0;
|
||||
|
||||
// const urls = window.location.href;
|
||||
// const gameNames = urls.split('/');
|
||||
// const gameTypes = gameNames[3].split('?id=');
|
||||
// console.log(gameTypes[0]);
|
||||
|
||||
|
||||
if(isMobile){
|
||||
cloudeSize = 200;
|
||||
@@ -120,35 +127,6 @@ import Layout from "../../layouts/Layout.astro";
|
||||
this.load.image('canvasStand', '/assets/stand2.png');
|
||||
}
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,10 +149,8 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitNotic.setVisible(false);
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 0", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "stat timr here";
|
||||
|
||||
@@ -117,35 +118,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -165,13 +138,11 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
});
|
||||
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitNotic.setVisible(false);
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 1", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -118,35 +119,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -170,9 +143,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 2", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -118,35 +119,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -170,9 +143,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 3", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -124,35 +125,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -175,9 +148,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 4", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -125,35 +126,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -176,9 +149,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 5", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 6", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 7", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -170,9 +143,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 8", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Number : 9", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -122,35 +123,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -173,9 +146,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : A", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -118,35 +119,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -169,9 +142,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : B", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -115,35 +116,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -166,9 +139,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : C", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -117,35 +118,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -168,9 +141,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : D", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer, fourthLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -116,35 +117,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -167,9 +140,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : E", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : F", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -110,41 +111,8 @@ import Layout from "../../layouts/Layout.astro";
|
||||
this.load.image('bgMobile', '/assets/bgMobile.png');
|
||||
this.load.image('canvasStand', '/assets/stand2.png');
|
||||
}
|
||||
window.onload = function() {
|
||||
currentDate = new Date();
|
||||
formattedDateTime = currentDate.toLocaleString();
|
||||
// console.log("Page loaded on: " + formattedDateTime);
|
||||
};
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -167,9 +135,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : G", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : H", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : I", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -115,35 +116,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -166,9 +139,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : J", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -167,13 +140,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : K", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -116,35 +117,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -163,13 +136,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : L", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer, fourthLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -117,35 +118,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -164,13 +137,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : M", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -121,35 +122,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -168,13 +141,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : N", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -115,35 +116,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -162,13 +135,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : O", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -117,35 +118,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -164,13 +137,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : P", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -117,35 +118,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -164,13 +137,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : Q", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -123,35 +124,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -170,13 +143,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : R", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -115,35 +116,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -162,13 +135,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : S", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -117,35 +118,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -164,13 +137,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : T", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -115,35 +116,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -162,13 +135,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : U", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -116,35 +117,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -163,13 +136,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : V", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer, fourthLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -116,35 +117,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -163,13 +136,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : W", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -117,35 +118,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -164,13 +137,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : X", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -121,35 +122,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -168,13 +141,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : Y", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -167,13 +140,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : Z", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -170,9 +143,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : a", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -118,35 +119,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -169,9 +142,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : b", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -118,35 +119,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -169,9 +142,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : c", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : d", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : e", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -118,35 +119,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -169,9 +142,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : f", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : g", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -170,9 +143,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : h", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,9 +144,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : i", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -170,9 +143,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : j", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -122,35 +123,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -173,9 +146,9 @@ import Layout from "../../layouts/Layout.astro";
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : k", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -117,35 +118,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -164,13 +137,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : l", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -167,13 +140,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : m", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -166,13 +139,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : n", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -116,35 +117,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -163,13 +136,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : o", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -38,7 +39,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -116,35 +117,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -163,13 +136,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : p", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -38,7 +39,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -118,35 +119,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -165,13 +138,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : q", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -167,13 +140,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : r", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -116,35 +117,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -163,13 +136,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : s", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -167,13 +140,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : t", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -166,13 +139,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : u", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -166,13 +139,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : v", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer, fourthLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -166,13 +139,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : w", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -120,35 +121,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -167,13 +140,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : x", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
|
||||
@@ -119,35 +120,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -166,13 +139,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : y", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
@@ -8,6 +8,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<script is:inline src="/assets/js/phaser_3.60.0.js"></script>
|
||||
</main>
|
||||
</Layout>
|
||||
<script src="/saveGameData.js" is:inline></script>
|
||||
<script is:inline>
|
||||
const isMobile = window.innerWidth <= 768;
|
||||
const drawingZone = {
|
||||
@@ -39,7 +40,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
let firstLayer, secondLayer, thirdLayer;
|
||||
let graphics;
|
||||
let animatedLetter;
|
||||
let isDrawing = false;
|
||||
let scoreTotal = 0; let isDrawing = false;
|
||||
let formattedDateTime;
|
||||
let gameStartTime = "start time here";
|
||||
// let x = 100;
|
||||
@@ -124,35 +125,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
}
|
||||
|
||||
function create() {
|
||||
const URL = window.location.href;
|
||||
const urlSplit = URL.split('/');
|
||||
const gameName = urlSplit[3] + '-' + urlSplit[4]
|
||||
let userData = {
|
||||
'user': 'guided-tracing@beanstalkedu.com',
|
||||
'game_name': gameName,
|
||||
'starts': formattedDateTime,
|
||||
'game_start' : gameStartTime,
|
||||
};
|
||||
function submitUserData() {
|
||||
// console.log(userData)
|
||||
fetch(`https://2016.dev2-cs.siliconpin.com/save/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type' : 'application/json'
|
||||
},
|
||||
body: JSON.stringify(userData)
|
||||
})
|
||||
.then(response => {
|
||||
if(response.ok){
|
||||
// console.log('Data Saved', response)
|
||||
} else{
|
||||
// console.log('Something Wrong', response)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('An error occured', error)
|
||||
});
|
||||
};
|
||||
|
||||
const submitNotic = this.add.text(noticeWidth, noticeHeight, 'Submitted Successfully', {
|
||||
font: '600 20px Quicksand',
|
||||
fill: '#05b3a4'
|
||||
@@ -171,13 +144,13 @@ import Layout from "../../layouts/Layout.astro";
|
||||
fill: true
|
||||
}
|
||||
});
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setVisible(false);
|
||||
submitButton.setInteractive().on('pointerdown', () => {
|
||||
// console.log('Clicked');
|
||||
submitButton.setVisible(false);
|
||||
submitNotic.setVisible(true);
|
||||
submitNotic.setVisible(false);
|
||||
// windowLoad();
|
||||
submitUserData();
|
||||
submitUserData(this);
|
||||
})
|
||||
this.add.image(customWidth / 2 * 1.6 - 0.5, 50, 'topLogo');
|
||||
this.add.text(customWidth / 10, 20, "Letter : z", { font: '700 40px quicksand', fill: '#05b3a4', });
|
||||
|
||||
Reference in New Issue
Block a user