feat(nds): add audio in all menus
This commit is contained in:
@@ -68,6 +68,9 @@ export const useSettingsStore = defineStore("settings", {
|
||||
},
|
||||
|
||||
async openSubMenu(submenu: SettingsSubMenu) {
|
||||
const { assets } = useAssets();
|
||||
assets.audio.menuOpen.play();
|
||||
|
||||
await gsap
|
||||
.timeline()
|
||||
.to(this.submenuTransition, {
|
||||
@@ -99,7 +102,12 @@ export const useSettingsStore = defineStore("settings", {
|
||||
}
|
||||
},
|
||||
|
||||
async closeSubMenu() {
|
||||
async closeSubMenu(silent = false) {
|
||||
if (!silent) {
|
||||
const { assets } = useAssets();
|
||||
assets.audio.menuError.play();
|
||||
}
|
||||
|
||||
await gsap
|
||||
.timeline()
|
||||
.to(this, {
|
||||
@@ -148,6 +156,8 @@ export const useSettingsStore = defineStore("settings", {
|
||||
animateIntro() {
|
||||
this.isIntro = true;
|
||||
|
||||
const { assets } = useAssets();
|
||||
|
||||
gsap
|
||||
.timeline()
|
||||
// bars
|
||||
@@ -178,6 +188,7 @@ export const useSettingsStore = defineStore("settings", {
|
||||
{ 1: 0, duration: 0.1, ease: "none" },
|
||||
0.2,
|
||||
)
|
||||
.call(() => assets.audio.settingsMenuIntro.play(), undefined, 0.2)
|
||||
.fromTo(
|
||||
this.menuOffsets,
|
||||
{ 2: -48 },
|
||||
@@ -198,8 +209,11 @@ export const useSettingsStore = defineStore("settings", {
|
||||
animateOutro() {
|
||||
this.isOutro = true;
|
||||
|
||||
const { assets } = useAssets();
|
||||
|
||||
gsap
|
||||
.timeline()
|
||||
.call(() => assets.audio.settingsMenuOutro.play())
|
||||
// title notification
|
||||
.fromTo(
|
||||
this,
|
||||
|
||||
Reference in New Issue
Block a user