Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NightLightLumie committed Aug 18, 2024
2 parents b1aba78 + 7e4bc70 commit aeae6f0
Show file tree
Hide file tree
Showing 8 changed files with 502 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Customer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button } from "./elements/Button";
import { Station } from "./Station";
import { Employee } from "./Employee";
import { Timer } from "./Timer";
import { interpolateColor } from "@/functions";
import { interpolateColor } from "@/utils/functions";
import { ThoughtBubble } from "./ThoughtBubble";
import { StationType } from "./StationData";
import { CustomerData, CustomerId } from "./CustomerData";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Station.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
StationType,
StationTypeData,
} from "./StationData";
import { interpolateColor } from "@/functions";
import { interpolateColor } from "@/utils/functions";
import { SimpleButton } from "./elements/SimpleButton";
import { TextEffect } from "./TextEffect";

Expand Down
4 changes: 3 additions & 1 deletion src/components/elements/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { BaseScene } from "@/scenes/BaseScene";

export class Button extends Phaser.GameObjects.Container {
public scene: BaseScene;
public enabled: boolean;
// private hover: boolean;
private _hold: boolean;
public dragged: boolean;
Expand All @@ -20,6 +21,7 @@ export class Button extends Phaser.GameObjects.Container {
this._hold = false;
this.dragged = false;
this.blocked = false;
this.enabled = true;

this.liftSmooth = 0;
this.holdSmooth = 0;
Expand Down Expand Up @@ -105,7 +107,7 @@ export class Button extends Phaser.GameObjects.Container {
localY: number,
event: Phaser.Types.Input.EventData
) {
if (this.hold && !this.blocked) {
if (this.hold && !this.blocked && this.enabled) {
this.emit("click");
}
if (this.hold) this.emit("up");
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/TitleScene.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseScene } from "@/scenes/BaseScene";
import { Music } from "@/components/Music";
import { Music } from "@/utils/Music";

import { title, version } from "@/version.json";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Music.ts → src/utils/Music.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MusicData, { MusicKey } from "@/components/MusicData";
import MusicData, { MusicKey } from "@/utils/MusicData";

export class Music extends Phaser.Sound.WebAudioSound {
public _prevBarTime: number;
Expand Down
File renamed without changes.
Loading

0 comments on commit aeae6f0

Please sign in to comment.