Skip to content

Commit

Permalink
sound when a field goal is scored
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantomat0 committed Sep 27, 2022
1 parent 295ce3c commit 7275f4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/room-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/room/plays/Fieldgoal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default class FieldGoal extends FieldGoalEvents {
}

handleSuccessfulFg() {
Chat.send(`${ICONS.GreenCheck} Field Goal is good!`);
Chat.send(`${ICONS.GreenCheck} Field Goal is good!`, { sound: 2 });

Room.game.stats.updatePlayerStat(this._kicker.id, {
fgAttempts: 1,
Expand Down
6 changes: 3 additions & 3 deletions src/room/plays/play_events/FieldGoal.events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export default abstract class FieldGoalEvents extends BasePlay<FieldGoalStore> {
protected abstract _handleBallContactKicker(
ballContactObj: BallContact
): void;
abstract handleUnsuccessfulFg(msg: string): void;
abstract handleSuccessfulFg(msg: string): void;
abstract handleUnsuccessfulFg(): void;
abstract handleSuccessfulFg(): void;

onBallContact(ballContactObj: BallContact) {
// We have to do this check AGAIN because playerOnkick is not an event listener, but a native listener
Expand All @@ -39,7 +39,7 @@ export default abstract class FieldGoalEvents extends BasePlay<FieldGoalStore> {
}

onBallOutOfBounds(ballPosition: Position) {
this.handleUnsuccessfulFg("Missed");
this.handleUnsuccessfulFg();
}

onBallCarrierOutOfBounds(ballCarrierPosition: Position) {
Expand Down

0 comments on commit 7275f4a

Please # to comment.