Skip to content

Commit

Permalink
gigamerge
Browse files Browse the repository at this point in the history
  • Loading branch information
NightLightLumie committed Aug 20, 2024
1 parent f9752b9 commit f440c73
Showing 1 changed file with 0 additions and 150 deletions.
150 changes: 0 additions & 150 deletions src/scenes/GameScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f440c73

Please sign in to comment.