-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from BarthPaleologue/NextRelease
1.7.0 - Improved flight experience
- Loading branch information
Showing
32 changed files
with
496 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2.77 MB
src/asset/sound/318688__limitsnap_creations__rocket-thrust-effect.mp3
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { AudioInstance } from "../utils/audioInstance"; | ||
|
||
|
||
export class AudioManager { | ||
private static ENABLED_MASK = 0b1111; | ||
|
||
private static readonly SOUNDS: AudioInstance[] = []; | ||
|
||
public static RegisterSound(sound: AudioInstance) { | ||
this.SOUNDS.push(sound); | ||
} | ||
|
||
public static SetMask(mask: number) { | ||
this.ENABLED_MASK = mask; | ||
} | ||
|
||
public static Update(deltaSeconds: number) { | ||
this.SOUNDS.forEach(sound => { | ||
const isSoundEnabled = (sound.mask & this.ENABLED_MASK) !== 0; | ||
sound.setMaskFactor(isSoundEnabled ? 1 : 0); | ||
sound.update(deltaSeconds); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const AudioMasks = { | ||
STAR_SYSTEM_VIEW: 0b0001, | ||
STAR_MAP_VIEW: 0b0010, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.