Skip to content

Commit

Permalink
fix eslint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
sk337 authored Nov 14, 2023
1 parent 68e1b21 commit 02cf8af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/GameScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,7 @@ class GameScene extends Phaser.Scene {
(coin?this.coin:this.chestOpen).play();
}
// eslint-disable-next-line semi
if(this.coins.find(coin => coin.id == coinId)) this.coins.find(coin => coin.id == coinId).state = {collected: true, collectedBy: playerId, time: 0}
if(this.coins.find(coin => coin.id == coinId)) this.coins.find(coin => coin.id == coinId).state = {collected: true, collectedBy: playerId, time: 0};
else if(this.chests.find(chest => chest.id == coinId)) {
var chest = this.chests.find(chest => chest.id == coinId);

Expand Down
12 changes: 6 additions & 6 deletions src/TitleScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ try {
const data = await response.json();
return data;
} catch (error) {
console.error('Error fetching data:', error);
console.error("Error fetching data:", error);
return [];
}
}
Expand All @@ -196,7 +196,7 @@ try {

data.forEach((item) => {
const itemDiv = document.createElement("div");
itemDiv.classList.add('featured-item');
itemDiv.classList.add("Featured-item");

const thumbnailImg = document.createElement("img");
thumbnailImg.src = item.source == "youtube" ? "https://www.cdnlogo.com/logos/y/84/youtube.svg" : "/assets/images/sword.png";
Expand Down Expand Up @@ -357,7 +357,7 @@ try {
let debugMode = false;
try {
const urlParams = new URLSearchParams(window.location.search);
const ad = urlParams.get('debugAd');
const ad = urlParams.get("debugAd");
if(ad) {
debugMode = true;
}
Expand Down Expand Up @@ -393,7 +393,7 @@ try {
let failed= false;
try {
const urlParams = new URLSearchParams(window.location.search);
const ad = urlParams.get('debugAd');
const ad = urlParams.get("debugAd");
if(ad) {
alert(evt+ " ad completed");
}
Expand Down Expand Up @@ -429,7 +429,7 @@ transform: translateX(-50%);
// Check url query param
try {
const urlParams = new URLSearchParams(window.location.search);
const ad = urlParams.get('debugAd');
const ad = urlParams.get("debugAd");
if(ad) {
alert("Ad failed to load -- aiptag is undefined");
}
Expand Down Expand Up @@ -965,7 +965,7 @@ document.getElementById("shopFrame").style.display = "none";

// console.log(this.canvas.width + " " + this.canvas.height, this.canvas.width / this.canvas.height);
this.featured.y = this.canvas.height/3;
this.featured.setScale(0.9)
this.featured.setScale(0.9);
if(this.canvas.width < 1000 || this.canvas.height < 700 || this.mobile) {
if(this.mobile) {
this.featured.visible = false;
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ var gameScene = new GameScene((instantStart=false) => {
titleScene.instantStart = instantStart;
firstPlay = false;
});
console.log(Date.now()-lastAd, "lastAd")
console.log(Date.now()-lastAd, "lastAd");
var titleScene = new TitleScene(((Date.now() - lastAd > adDelay) && !firstPlay), (name, music, secret, adFailed = false) => {
gameScene.name = name;
gameScene.options = titleScene.options;
Expand All @@ -119,7 +119,7 @@ var titleScene = new TitleScene(((Date.now() - lastAd > adDelay) && !firstPlay),
titleScene.scene.start("game");
titleScene.showPromo = false;
if(!adFailed) {
console.log(Date.now()-lastAd, "lastAd")
console.log(Date.now()-lastAd, "lastAd");

if(( Date.now() - lastAd > adDelay)) {
if(sva){
Expand All @@ -130,7 +130,7 @@ var titleScene = new TitleScene(((Date.now() - lastAd > adDelay) && !firstPlay),
}
}
}else {
console.log("ad failed")
console.log("ad failed");
}
});

Expand Down

0 comments on commit 02cf8af

Please sign in to comment.