From f440c739b6651f2787bf2954c35dc991eaaf40ee Mon Sep 17 00:00:00 2001 From: Lumie Date: Tue, 20 Aug 2024 03:58:04 -0700 Subject: [PATCH] gigamerge --- src/scenes/GameScene.ts | 150 ---------------------------------------- 1 file changed, 150 deletions(-) diff --git a/src/scenes/GameScene.ts b/src/scenes/GameScene.ts index f2b1ba0..a643495 100644 --- a/src/scenes/GameScene.ts +++ b/src/scenes/GameScene.ts @@ -1067,19 +1067,6 @@ export class GameScene extends BaseScene { this.inventory.buyItem(id, qt); } - pauseInvButton(){ - this.invButton.spr.input!.enabled = false; - this.invButton.setAlpha(0.34); - } - - resumeInvButton(){ - this.invButton.spr.input!.enabled = true; - this.invButton.setAlpha(0.85); - } - - buyItem(id: number, qt:number) { - this.inventory.buyItem(id, qt); - } pauseInvButton(){ this.invButton.spr.input!.enabled = false; @@ -1283,143 +1270,6 @@ export class GameScene extends BaseScene { return this.inventory.itemList[id].quant; } - removeMoney(n: number){ - this.money -= n; - this.ui.setMoney(this.money); - this.sound.play("cashmoney"); - /* - this.addEffect( - new TextEffect( - scene, - this.x - 70 + Math.random() * 80, - this.y - 80, - "+" + this.moneySpent + " €", - "yellow", - 40, - true, - "red", - 800, - 100, - 0.7, - 0 - ) - );*/ - } - - beginShopTutorial(n: number){ - this.shopTutorialIndex = n; - this.shopTutorialInitialized = false; - this.ownerImage.input!.enabled = false; - this.ownerImage.setFrame(this.shopTutorialFrames[n]); - this.shopText.setText(this.shopTutorialText[n]); - this.shopClicker.setVisible(true); - this.shopSpeech.setVisible(true); - this.shopSpeech.setAlpha(0); - this.tutorialTimer = 1000; - if(n > 0) { - this.pauseInvButton(); - } - } - - updateShopTutorial(t: number, d: number){ - - if(this.dinonugget > 0) { - this.dinonugget -= d; - //console.log("DINO NUGGET"); - if(this.dinonugget <= 0) { - this.shopClicker.setAlpha(0); - this.shopSpeech.setAlpha(0); - this.shopSpeech.setVisible(false); - this.shopClicker.setVisible(false); - this.shopOwnerState = -1 - } else { - this.shopClicker.setAlpha(this.dinonugget/300); - this.shopSpeech.setAlpha(this.dinonugget/300); - } - } - if(this.viewedShopTutorial){ - return; - } - if(!this.shopTutorialInitialized) { - if(this.tutorialTimer > 0) { - if((this.tutorialTimer > 300)) { - this.tutorialTimer -= d; - if(this.tutorialTimer <= 300) { - this.shopClicker.setPosition(1460, 540); - } else { - this.shopClicker.setPosition(1460,1480+-940*(1-((this.tutorialTimer-300)/700))); - } - } else if (this.tutorialTimer <= 300){ - this.tutorialTimer -= d; - if(this.tutorialTimer <= 0) { - this.shopSpeech.setAlpha(1); - this.shopTutorialInitialized = true; - this.ownerImage.input!.enabled = true; - if(this.shopTutorialIndex == 0){ - this.shopOpenCheck = true; - } - this.canProceed = [true,false,false]; - } - this.shopSpeech.setAlpha(1-(this.tutorialTimer/300)); - } - } - } else if (!this.viewedShopTutorial) { - if(this.tutorialTimer > 0) { - this.tutorialTimer -= d; - if(this.tutorialTimer <= 0){ - this.shopSpeech.setAlpha(1); - this.canProceed = [true,false,false]; - this.ownerImage.input!.enabled = true; - } else { - this.shopSpeech.setAlpha(1-(this.tutorialTimer/300)); - } - } - } - } - - proceedShopTutorial(){ - if(this.shopOpenCheck || (!this.canProceed)) { - return; - } - this.shopTutorialIndex++; - if(this.shopTutorialIndex < this.shopTutorialText.length) { - this.canProceed=[false,false,false]; - this.tutorialTimer=300; - this.shopSpeech.setAlpha(0); - this.shopText.setText(this.shopTutorialText[this.shopTutorialIndex]); - this.ownerImage.setFrame(this.shopTutorialFrames[this.shopTutorialIndex]); - this.ownerImage.input!.enabled = false; - } else { - this.completeShopTutorial(); - } - } - - completeShopTutorial(){ - this.canProceed=[false,false,false]; - this.ownerImage.input!.enabled = false; - this.viewedShopTutorial = true; - this.sound.play("meme_explosion_sound"); - this.dinonugget = 300; - this.shopOwnerState = 2; - this.resumeInvButton(); - } - - pauseAllClickables(){ - this.stations.forEach((s) => s.pauseClickable()); - this.customers.forEach((c) => c.pauseClickable()); - this.employees.forEach((e) => e.pauseClickable()); - } - - resumeAllClickables(){ - this.stations.forEach((s) => s.resumeClickable()); - this.customers.forEach((c) => c.resumeClickable()); - this.employees.forEach((e) => e.resumeClickable()); - } - - getAmountOwned(id: number){ - return this.inventory.itemList[id].quant; - } - veilInvButton() { this.invButton.setAlpha(0.17); }