Commit ee5b6817 authored by wildfirecode's avatar wildfirecode

1

parent d494142d
let soundOn = true;
let bgOn = true;
let bgChannel: egret.SoundChannel;
let loading = false;
export const getSoundOn = () => {
return soundOn
}
export const getBgOn = () => {
return bgOn
}
export const toggleSound = () => {
soundOn = !soundOn;
}
export const toggleBg = () => {
bgOn = !bgOn;
if (bgChannel) {
if (!soundOn) {
if (!bgOn) {
bgChannel.stop();
bgChannel = null;
}
} else {
if (soundOn) {
if (bgOn) {
playBg();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment