diff --git a/src/assets/assets.ts b/src/assets/assets.ts index 42f2964..8c6cfb9 100644 --- a/src/assets/assets.ts +++ b/src/assets/assets.ts @@ -138,6 +138,11 @@ const audios: Audio[] = [ sound('goldbath', 'goldbath', 0.5), sound('fail', 'rip', 0.5), sound('sqk', 'sqk', 0.5), + sound('endday', 'endday', 0.5), + sound('chomp', 'chomp', 0.5), + sound('bite', 'bite', 0.5), + sound('doink', 'doink', 0.5), + sound('slurp', 'slurp', 0.5), sound('tree/meme_explosion_sound', 'meme_explosion_sound', 0.5), ]; diff --git a/src/assets/images/items/checkout.png b/src/assets/images/items/checkout.png index 92fd5c4..ad14eee 100644 Binary files a/src/assets/images/items/checkout.png and b/src/assets/images/items/checkout.png differ diff --git a/src/assets/images/items/wax1.png b/src/assets/images/items/wax1.png index 391a613..29317a1 100644 Binary files a/src/assets/images/items/wax1.png and b/src/assets/images/items/wax1.png differ diff --git a/src/assets/images/items/wax2.png b/src/assets/images/items/wax2.png index fbb86e3..df25a95 100644 Binary files a/src/assets/images/items/wax2.png and b/src/assets/images/items/wax2.png differ diff --git a/src/assets/images/items/wax3.png b/src/assets/images/items/wax3.png index 008f519..fda8f9d 100644 Binary files a/src/assets/images/items/wax3.png and b/src/assets/images/items/wax3.png differ diff --git a/src/assets/sounds/bite.mp3 b/src/assets/sounds/bite.mp3 new file mode 100644 index 0000000..5756327 Binary files /dev/null and b/src/assets/sounds/bite.mp3 differ diff --git a/src/assets/sounds/chomp.mp3 b/src/assets/sounds/chomp.mp3 new file mode 100644 index 0000000..a80487c Binary files /dev/null and b/src/assets/sounds/chomp.mp3 differ diff --git a/src/assets/sounds/doink.mp3 b/src/assets/sounds/doink.mp3 new file mode 100644 index 0000000..593940c Binary files /dev/null and b/src/assets/sounds/doink.mp3 differ diff --git a/src/assets/sounds/endday.mp3 b/src/assets/sounds/endday.mp3 new file mode 100644 index 0000000..7d61902 Binary files /dev/null and b/src/assets/sounds/endday.mp3 differ diff --git a/src/assets/sounds/slurp.mp3 b/src/assets/sounds/slurp.mp3 new file mode 100644 index 0000000..6733db3 Binary files /dev/null and b/src/assets/sounds/slurp.mp3 differ diff --git a/src/components/Customer.ts b/src/components/Customer.ts index b3ce101..88d66d1 100644 --- a/src/components/Customer.ts +++ b/src/components/Customer.ts @@ -51,6 +51,8 @@ export class Customer extends Button { public maxPatience: number = 1; // bonuses public lockPatience: boolean; // bonuses + public actionsComplete: boolean = false; + // Stats public doingCuteThing: boolean; public tasksCompleted: number; @@ -64,8 +66,14 @@ export class Customer extends Button { private angryImage: Phaser.GameObjects.Image; private patienceTimer: Timer; + public itemList: number[]; + public sprList: Phaser.GameObjects.Sprite[]; + private testTimer:PatienceTimer; + private eatDelay: number = 0; + private playFail: boolean = false; + //testing stuff constructor( scene: GameScene, @@ -129,6 +137,9 @@ export class Customer extends Button { this.patienceTimer.setAlpha(0); this.add(this.patienceTimer); + this.itemList = []; + this.sprList = []; + this.bindInteractive(this.sprite, true); } @@ -144,6 +155,7 @@ export class Customer extends Button { interpolateColor(0xffffff, 0xff0000, 1 - this.happiness) ); + if (this.isWaiting) { this.patienceTimer.setVisible(true); if (!this.dragged) { @@ -177,10 +189,33 @@ export class Customer extends Button { this.emit("angry"); } } else { - this.testTimer.update(time,delta); this.patienceTimer.setVisible(false); this.angryImage.setVisible(false); } + + this.testTimer.update(time,delta); + if(this.itemList.length > 0){ + if(this.eatDelay <= 0) { + this.eatDelay = 100+Math.random()*200; + } + } + if(this.eatDelay > 0){ + this.eatDelay -= delta; + if(this.eatDelay <= 0) { + this.eatDelay = 0; + if(this.itemList.length > 0) { + this.scene.parseCustomerItems(this.itemList.shift()!,this); + if(this.sprList[0]){ + this.sprList[0].destroy(); + this.sprList.shift(); + } + } + } + } + if(this.playFail){ + this.scene.sound.play("rip"); + this.playFail = false; + } } onOver( pointer: Phaser.Input.Pointer, @@ -296,6 +331,7 @@ export class Customer extends Button { this.hasCompleted = true; this.setRequest(StationType.CashRegister); } else { + this.actionsComplete = true; this.parseMoney(); this.scene.sound.play("cashmoney"); this.scene.addEffect( @@ -486,6 +522,26 @@ export class Customer extends Button { this.tips = Math.trunc(this.tips); } + applyItem(i: number, s: string){ + this.itemList.push(i); + let st = new Phaser.GameObjects.Sprite( + this.scene, + -80 + 40 * this.itemList.length, + 60, + s + ); + st.setOrigin(0.5, 0.5); + st.setScale(0.4); + st.setDepth(4); + st.setAlpha(0.85); + this.add(st); + this.sprList.push(st); + } + + queueFail(){ + this.playFail = true; + } + parseMoney() { this.parseHappiness(); } diff --git a/src/components/Inventory.ts b/src/components/Inventory.ts index 9d294b2..e5755dc 100644 --- a/src/components/Inventory.ts +++ b/src/components/Inventory.ts @@ -3,6 +3,7 @@ import { GameScene } from "@/scenes/GameScene"; import { Item } from "./Item"; import { SimpleButton } from "./elements/SimpleButton"; import { ItemButton } from "./ItemButton"; +import { SnapType } from "./Item"; export class Inventory extends Phaser.GameObjects.Container { public scene: GameScene; @@ -25,19 +26,19 @@ export class Inventory extends Phaser.GameObjects.Container { super(scene,x,y); this.scene=scene; this.itemList = [ - new Item(0,"rock",stock[0],1,["rock","cheap"],["cheap"],"Complimentary Pet Rock","A loving pet rock to cheer up any customer. Works modestly well."), - new Item(1,"coke",stock[1],50,["drug"],["illegal","cool"],"Cocaine","A delicious white powder made from plants. Improves working speed a whole bunch!"), - new Item(2,"hotdog",stock[2],25,["raptor","meat","bread","skeleton","ketchup","mustard","gay"],["meat","elitist","gay","gluten"],"Hot Dog","A big wiener with sauce, to satisfy any meat lover. You can also buy a bacon-wrapped cheesy version for 69 kr."), - new Item(3,"brocc",stock[3],12,["triceratops","veggie","healthy","stinky"],["veggie","healthy","stinky"],"Broccoli","This large stalk of free-range broccoli is perfect for vegans and herbivorous animals."), - new Item(4,"usb",stock[4],30,["protogen","tech","metal","nerd"],["nerd","tech"],"Mini USB Drive", "Additional storage space in a compact unit. I wonder who would want this?"), - new Item(5,"milk",stock[5],40,["dragon","horny","creamy","lactose","gay"],["horny","creamy","lactose","gay"],"Fresh Milk","Fresh, creamy milk for dragons. Still warm and thick."), - new Item(6,"snowglobe",stock[6],35,["lugia","kitsch","cold","ball"],["kitsch","cold","ball"],"Snowglobe","A cute little snowglobe. A certain type of customer might want this."), - new Item(7,"pocky",stock[7],30,["boykisser","weeb","cringe","sweet","chocolate"],["weeb","cringe","sweet"],"P*cky","Sweet snack made of edible sticks. There's a traditional game where you kiss while biting them. A favorite of virgins."), - new Item(8,"hourglass",stock[8],110,["time","physics","glass"],["physics"],"Hourglass","Turns back the time on a customer's patience. Might make it hard to work though..."), - new Item(9,"hypnosis",stock[9],90,["hypno","horny","kinky","weird","psychic"],["horny","kinky","weird"],"Hypnosis","Uses a state of hypnosis to keep a customer's patience constant. You can't increase it any more either though."), - new Item(10,"polish",stock[10],80,["expensive","creamy","musky"],["expensive","musky"],"Extra-Premium Polish","Gives scales a wonderful gloss and unique scent. Most customers love it, but comes at a premium."), - new Item(11,"pillowtalk",stock[11],50,["horny","soft","cringe"],["horny","cringe"],"Pillow Talk","Talk to a customer alluringly to have them use more services. Good telemarketing is vital!"), - new Item(12,"shuriken",stock[12],75,["sharp","weeb","ninja","cringe","cool"],["cool","cringe","weeb","sharp"],"Shuriken","Some type of fidget spinner that sharpens mental capabilites. Allows a worker to critical manicure."), + new Item(0,"rock",stock[0],1,["rock","cheap"],["cheap"],"Complimentary Pet Rock","A loving pet rock to cheer up any customer. Works modestly well.", SnapType.CUSTOMER, "doink"), + new Item(1,"coke",stock[1],50,["drug"],["illegal","cool"],"Sugar","A delicious white powder made from plants. Improves working speed a whole bunch!", SnapType.STATION, "chomp"), + new Item(2,"hotdog",stock[2],25,["raptor","meat","bread","skeleton","ketchup","mustard","gay"],["meat","elitist","gay","gluten"],"Hot Dog","A big wiener with sauce, to satisfy any meat lover. You can also buy a bacon-wrapped cheesy version for 69 kr.", SnapType.CUSTOMER, "chomp"), + new Item(3,"brocc",stock[3],12,["triceratops","veggie","healthy","stinky"],["veggie","healthy","stinky"],"Broccoli","This large stalk of free-range broccoli is perfect for vegans and herbivorous animals.", SnapType.CUSTOMER, "chomp"), + new Item(4,"usb",stock[4],30,["protogen","tech","metal","nerd"],["nerd","tech"],"Mini USB Drive", "Additional storage space in a compact unit. I wonder who would want this?", SnapType.CUSTOMER, "doink"), + new Item(5,"milk",stock[5],40,["dragon","horny","creamy","lactose","gay"],["horny","creamy","lactose","gay"],"Fresh Milk","Fresh, creamy milk for dragons to grow strong bones. Still warm and thick.", SnapType.CUSTOMER, "slurp"), + new Item(6,"snowglobe",stock[6],35,["lugia","kitsch","cold","ball"],["kitsch","cold","ball"],"Snowglobe","A cute little snowglobe. A certain type of customer might want this.", SnapType.CUSTOMER, "doink"), + new Item(7,"pocky",stock[7],30,["boykisser","weeb","cringe","sweet","chocolate"],["weeb","cringe","sweet"],"P*cky","Sweet snack made of edible sticks. There's a traditional game where you kiss while biting them. A favorite of virgins.", SnapType.CUSTOMER, "chomp"), + new Item(8,"hourglass",stock[8],110,["time","physics","glass"],["physics"],"Hourglass","Place on a workstation to fully turn back the time on a customer's patience. Might make it hard to work though...", SnapType.STATION, "doink"), + new Item(9,"hypnosis",stock[9],90,["hypno","horny","kinky","weird","psychic"],["horny","kinky","weird"],"Hypnosis","Uses a state of hypnosis to keep a customer's patience constant. You can't increase it any more either though.", SnapType.CUSTOMER, "doink"), + new Item(10,"polish",stock[10],80,["expensive","creamy","musky"],["expensive","musky"],"Extra-Premium Polish","Put this on a station to give scales a wonderful gloss and unique scent. Most customers love it, but comes at a premium.", SnapType.STATION, "slurp"), + new Item(11,"pillowtalk",stock[11],50,["horny","soft","cringe"],["horny","cringe"],"Pillow Talk","Instruct a station to talk to a customer alluringly and have them use more services. Good telemarketing is vital!", SnapType.STATION, "slurp"), + new Item(12,"shuriken",stock[12],75,["sharp","weeb","ninja","cringe","cool"],["cool","cringe","weeb","sharp"],"Shuriken","Equip a station to allow the stylists to critically strike when grooming! It's some type of mysterious fidget spinner that sharpens mental capabilites. ", SnapType.STATION, "meme_explosion_sound"), ]; this.display = []; this.window = new Phaser.GameObjects.Image(this.scene,x,y,"invwindow"); @@ -92,14 +93,14 @@ export class Inventory extends Phaser.GameObjects.Container { let rs = 0; for(let np = this.currentIndices[0]; np < this.currentIndices[1]+1; np++){ if(np < this.itemList.length){ - this.display.push(new ItemButton(this.scene,this.coordinates[rs][0], this.coordinates[rs][1], this, this.itemList[np].id, rs, this.itemList[np].spr)); + this.display.push(new ItemButton(this.scene,this.coordinates[rs][0], this.coordinates[rs][1], this, this.itemList[np].id, rs, this.itemList[np].spr, this.itemList[np].snap)); if(this.itemList[np].quant <= 0) { this.display[rs].shadow(); } this.add(this.display[rs]); } else { - this.display[rs] = new ItemButton(this.scene,this.coordinates[rs][0], this.coordinates[rs][1], this, -1, rs, "blankspr"); + this.display[rs] = new ItemButton(this.scene,this.coordinates[rs][0], this.coordinates[rs][1], this, -1, rs, "blankspr", SnapType.STATION); this.add(this.display[rs]); } rs++; @@ -112,14 +113,14 @@ export class Inventory extends Phaser.GameObjects.Container { this.display = []; for(let np = this.currentIndices[0]; np < this.currentIndices[1]+1; np++){ if(np < this.itemList.length){ - this.display.push(new ItemButton(this.scene,this.coordinates[rs][0], this.coordinates[rs][1], this, this.itemList[np].id, rs, this.itemList[np].spr)); + this.display.push(new ItemButton(this.scene,this.coordinates[rs][0], this.coordinates[rs][1], this, this.itemList[np].id, rs, this.itemList[np].spr, this.itemList[np].snap)); if(this.itemList[np].quant <= 0) { this.display[rs].shadow(); } this.add(this.display[rs]); } else { - this.display.push(new ItemButton(this.scene,this.coordinates[rs][0], this.coordinates[rs][1], this, -1, rs, "blankspr")); + this.display.push(new ItemButton(this.scene,this.coordinates[rs][0], this.coordinates[rs][1], this, -1, rs, "blankspr", SnapType.STATION)); this.add(this.display[rs]); } rs++; @@ -178,6 +179,22 @@ export class Inventory extends Phaser.GameObjects.Container { } } + glassify(){ + this.window.setAlpha(0.17); + this.title.setAlpha(0.2); + this.tdisplay.setAlpha(0.2); + this.fwButton.setAlpha(0.2); + this.display.forEach((sp) => sp.setAlpha(0.2)); + } + + unglassify(){ + this.window.setAlpha(0.85); + this.title.setAlpha(1); + this.tdisplay.setAlpha(1); + this.fwButton.setAlpha(1); + this.display.forEach((sp) => sp.setAlpha(1)); + } + scroll(){ if(this.currentIndices[1] < this.itemList.length) { let b = this.currentIndices[1] + 1; diff --git a/src/components/Item.ts b/src/components/Item.ts index a0d2d05..483e6c1 100644 --- a/src/components/Item.ts +++ b/src/components/Item.ts @@ -1,3 +1,8 @@ +export enum SnapType { + CUSTOMER, + STATION, +} + export class Item { public id:number; public spr:string; @@ -7,6 +12,10 @@ export class Item { public antitags:string[]; public name:string; public desc:string; + public snap:SnapType; + public sound: string; + + public clippingType: number; //-1 - default item, does nothing //0 - Complimentary Pet Rock - increases satisfaction by one stage @@ -23,7 +32,7 @@ export class Item { //11 - pillow talk - adds a random station to the end of a customer's itinerary //12 - shuriken - barbers can crit, crit causes happiness to raise one stage - constructor(id:number,sp:string,qt:number,pr:number,tgs:string[],atgs:string[],name:string,dsc:string) { + constructor(id:number,sp:string,qt:number,pr:number,tgs:string[],atgs:string[],name:string,dsc:string,snptype: SnapType, sound: string) { this.id=id; this.spr=sp; this.quant=qt; @@ -32,6 +41,9 @@ export class Item { this.antitags=atgs; this.name=name; this.desc=dsc; + this.snap = snptype; + this.sound = sound; + } setQuantity(n:number){ diff --git a/src/components/ItemButton.ts b/src/components/ItemButton.ts index 2a4a4b4..774f6e6 100644 --- a/src/components/ItemButton.ts +++ b/src/components/ItemButton.ts @@ -1,4 +1,4 @@ -import { Item } from "./Item"; +import { Item, SnapType } from "./Item"; import { Inventory } from "./Inventory"; import { Button } from "./elements/Button"; import { BaseScene } from "@/scenes/BaseScene"; @@ -15,13 +15,15 @@ export class ItemButton extends Button { public dragY: number; public doingCuteThing: boolean; private parent: Inventory; - constructor(scene:BaseScene,x:number,y:number,parent: Inventory, id:number, index:number, spr:string){ + public snap: SnapType; + constructor(scene:BaseScene,x:number,y:number,parent: Inventory, id:number, index:number, spr:string, snp: SnapType){ super(scene,x,y); this.parent = parent; this.default = [x,y]; this.id=id; this.index=index; this.sprname = spr; + this.snap = snp; this.spr = new Phaser.GameObjects.Sprite(this.scene,x,y,spr,0); this.spr.setOrigin(0.5,0.5); this.bindInteractive(this.spr, true); @@ -84,6 +86,7 @@ export class ItemButton extends Button { this.state = 3; this.parent.remove(this); this.parent.scene.setActiveItem(this); + this.parent.scene.veilInvButton(); this.setPosition(0,0); this.split(); this.passivate = true; @@ -139,7 +142,7 @@ export class ItemButton extends Button { } split(){ - this.parent.display[this.index] = new ItemButton(this.scene,this.default[0],this.default[1],this.parent,this.id,this.index,this.sprname); + this.parent.display[this.index] = new ItemButton(this.scene,this.default[0],this.default[1],this.parent,this.id,this.index,this.sprname,this.snap); this.parent.itemList[this.id].quant--; let r = this.parent.itemList[this.id].quant; if(r <= 0) { @@ -148,6 +151,7 @@ export class ItemButton extends Button { this.parent.display[this.index].select(); } this.parent.updateAmountText(this.id,r); + this.parent.glassify(); } } \ No newline at end of file diff --git a/src/components/ItemHandler.ts b/src/components/ItemHandler.ts index a719476..55559f6 100644 --- a/src/components/ItemHandler.ts +++ b/src/components/ItemHandler.ts @@ -90,6 +90,41 @@ export class ItemHandler { } } + + processCustomerItem(i: Item, ct: Customer){ + switch(i.id) + { + case -1: { + break; + } case 0: { + ct.rockBonus = 1; + break; + } case 2: { + this.parseCustomerPreferredItem(i,ct); + break; + } case 3: { + this.parseCustomerPreferredItem(i,ct); + break; + } case 4: { + this.parseCustomerPreferredItem(i,ct); + break; + } case 5: { + this.parseCustomerPreferredItem(i,ct); + break; + } case 6: { + this.parseCustomerPreferredItem(i,ct); + break; + } case 7: { + this.parseCustomerPreferredItem(i,ct); + break; + } case 9: { + ct.lockPatience = true; + break; + } + break; + } + } + parsePreferredItem(i: Item, st:Station, ct:Customer){ let state = 0; if((i.tags.length > 0) && (ct.tags.length > 0)) { @@ -123,4 +158,38 @@ export class ItemHandler { return; } } + + parseCustomerPreferredItem(i: Item, ct:Customer){ + let state = 0; + if((i.tags.length > 0) && (ct.tags.length > 0)) { + for(let nt = 0; nt < i.tags.length; nt++){ + if(ct.tags.includes(i.tags[nt])) { + state = 1; + } + } + } + + if((i.antitags.length > 0) && ct.antitags.length > 0){ + for(let na = 0; na < i.antitags.length; na++){ + if(ct.antitags.includes(i.tags[na])) { + state = -1; + } + } + } + + if(state == 1) { + ct.happinessBonus += 2; + ct.tipBonus+=0.25; + return; + } else if (state == -1) { + ct.happinessBonus -= 2.125; + ct.maxHappiness = 4.01; + ct.tipMultiplier*=0.25; + //ct.queueFail = true; + return; + } else { + ct.happinessBonus += 0.5; + return; + } + } } \ No newline at end of file diff --git a/src/scenes/GameScene.ts b/src/scenes/GameScene.ts index 9fd7dfe..1a62b87 100644 --- a/src/scenes/GameScene.ts +++ b/src/scenes/GameScene.ts @@ -19,6 +19,7 @@ import { Effect } from "@/components/Effect"; import { TextEffect } from "@/components/TextEffect"; import { BasicEffect } from "@/components/BasicEffect"; import { Intermission, Mode } from "@/components/Intermission"; +import { SnapType } from "@/components/Item"; import { NavMesh } from "navmesh"; import { centerOnSubdividedCoord, GenerateNavMesh } from "@/utils/NavMeshHelper"; @@ -148,6 +149,7 @@ export class GameScene extends BaseScene { [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10] ); this.invButton = new ToggleButton(this, 64, 540, "invbutton"); + this.invButton.setAlpha(0.85); this.add.existing(this.invButton); this.invButton.on("click", () => { this.toggleInventory(); @@ -162,7 +164,8 @@ export class GameScene extends BaseScene { this.inventory, -1, -100, - "blankspr" + "blankspr", + SnapType.STATION ); this.upgradeOverlay = new UpgradeOverlay(this); @@ -380,6 +383,7 @@ export class GameScene extends BaseScene { this.customerSpawnTimer.destroy(); //this.stations.forEach((s) => s.returnItems()); + this.sound.play("endday"); this.employees.forEach((e) => e.walkTo(e.startX, e.startY)); this.setState(GameState.Shopping); } @@ -793,13 +797,22 @@ export class GameScene extends BaseScene { } snapItem() { - let s = this.getClosestStationToItem(this.activeItem); - if (s) { - this.activeItem.snapTo(s.x, s.y); + if(this.activeItem.snap == SnapType.STATION) { + let s = this.getClosestStationToItem(this.activeItem); + if (s) { + this.activeItem.snapTo(s.x, s.y); + } + } else if (this.activeItem.snap == SnapType.CUSTOMER) { + console.log("Snapping to Customer"); + let ct = this.getClosestCustomerToItem(this.activeItem); + if (ct) { + this.activeItem.snapTo(ct.x, ct.y-30); + } } + } - cleanUpItem() { + applyToStation(){ let s = this.getClosestStationToItem(this.activeItem); if (s) { s.applyItem(this.activeItem.id, this.activeItem.sprname); @@ -816,14 +829,78 @@ export class GameScene extends BaseScene { this.inventory, -1, -100, - "blankspr" + "blankspr", + SnapType.STATION + ); + } + + + + applyToCustomer(){ + let cs = this.getClosestCustomerToItem(this.activeItem); + if (cs) { + cs.applyItem(this.activeItem.id, this.activeItem.sprname); + this.sound.play("place"); + } else { + this.returnItem(this.activeItem.id); + this.sound.play("return"); + } + this.activeItem.destroy(); + this.activeItem = new ItemButton( + this, + -500, + -500, + this.inventory, + -1, + -100, + "blankspr", + SnapType.STATION ); } + cleanUpItem() { + if(this.activeItem.snap == SnapType.CUSTOMER){ + this.applyToCustomer(); + } else if (this.activeItem.snap == SnapType.STATION){ + this.applyToStation(); + } + this.inventory.unglassify(); + this.unveilInvButton(); + } + returnItem(id: number) { this.inventory.returnItem(id); } + parseCustomerItems(i: number, ct: Customer){ + this.iHandler.processCustomerItem(this.inventory.itemList[i],ct); + this.sound.play(this.inventory.itemList[i].sound); + } + + getClosestCustomerToItem(item: ItemButton): Customer | null{ + let closestCustomer = null; + let closestDistance = Infinity; + const maxDistance = 70; + this.customers.forEach((cs) => { + const distance = Phaser.Math.Distance.Between( + item.dragX, + item.dragY, + cs.x, + (cs.y-30) + ); + if ( + (cs.itemList.length < 3) && + distance < closestDistance && + distance < maxDistance && + !(cs.actionsComplete) + ) { + closestCustomer = cs; + closestDistance = distance; + } + }); + return closestCustomer; + } + getClosestStationToItem(item: ItemButton): Station | null { let closestStation = null; let closestDistance = Infinity; @@ -850,6 +927,14 @@ export class GameScene extends BaseScene { return closestStation; } + veilInvButton(){ + this.invButton.setAlpha(0.17); + } + + unveilInvButton(){ + this.invButton.setAlpha(0.85); + } + sortDepth() { this.stations.forEach((s) => s.setDepth(s.y / 100 + 0)); this.employees.forEach((e) => e.setDepth(e.y / 100 + 1));