mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-24 22:16:14 -04:00
Extracted english translations
This commit is contained in:
parent
7999777f69
commit
7555ed0ff1
14 changed files with 10224 additions and 2910 deletions
|
@ -1,13 +1,15 @@
|
|||
import { gameState, isSettingOn } from "./game";
|
||||
import { gameState } from "./game";
|
||||
|
||||
import {isOptionOn} from "./options";
|
||||
|
||||
export const sounds = {
|
||||
wallBeep: (pan: number) => {
|
||||
if (!isSettingOn("sound")) return;
|
||||
if (!isOptionOn("sound")) return;
|
||||
createSingleBounceSound(800, pixelsToPan(pan));
|
||||
},
|
||||
|
||||
comboIncreaseMaybe: (combo: number, x: number, volume: number) => {
|
||||
if (!isSettingOn("sound")) return;
|
||||
if (!isOptionOn("sound")) return;
|
||||
let delta = 0;
|
||||
if (!isNaN(lastComboPlayed)) {
|
||||
if (lastComboPlayed < combo) delta = 1;
|
||||
|
@ -18,24 +20,24 @@ export const sounds = {
|
|||
},
|
||||
|
||||
comboDecrease() {
|
||||
if (!isSettingOn("sound")) return;
|
||||
if (!isOptionOn("sound")) return;
|
||||
playShepard(-1, 0.5, 0.5);
|
||||
},
|
||||
coinBounce: (pan: number, volume: number) => {
|
||||
if (!isSettingOn("sound")) return;
|
||||
if (!isOptionOn("sound")) return;
|
||||
createSingleBounceSound(1200, pixelsToPan(pan), volume, 0.1, "triangle");
|
||||
},
|
||||
explode: (pan: number) => {
|
||||
if (!isSettingOn("sound")) return;
|
||||
if (!isOptionOn("sound")) return;
|
||||
createExplosionSound(pixelsToPan(pan));
|
||||
},
|
||||
lifeLost(pan: number) {
|
||||
if (!isSettingOn("sound")) return;
|
||||
if (!isOptionOn("sound")) return;
|
||||
createShatteredGlassSound(pixelsToPan(pan));
|
||||
},
|
||||
|
||||
coinCatch(pan: number) {
|
||||
if (!isSettingOn("sound")) return;
|
||||
if (!isOptionOn("sound")) return;
|
||||
createSingleBounceSound(900, pixelsToPan(pan), 0.8, 0.1, "triangle");
|
||||
},
|
||||
colorChange(pan: number, volume: number) {
|
||||
|
@ -50,7 +52,7 @@ let audioContext: AudioContext,
|
|||
|
||||
export function getAudioContext() {
|
||||
if (!audioContext) {
|
||||
if (!isSettingOn("sound")) return null;
|
||||
if (!isOptionOn("sound")) return null;
|
||||
audioContext = new (window.AudioContext || window.webkitAudioContext)();
|
||||
audioRecordingTrack = audioContext.createMediaStreamDestination();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue