2025-07-21 05:42:20 -04:00
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using DG.Tweening;
|
2026-03-14 03:13:10 -04:00
|
|
|
using SLSUtilities.WwiseAssistance;
|
2025-08-22 14:54:40 -04:00
|
|
|
using UniRx;
|
2025-07-21 05:42:20 -04:00
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
2025-08-11 14:04:06 -04:00
|
|
|
namespace Ichni.Menu
|
2025-07-21 05:42:20 -04:00
|
|
|
{
|
|
|
|
|
public class PlaySongUI : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public Button enterGameButton;
|
|
|
|
|
public List<RectTransform> arrows;
|
|
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
|
|
|
|
enterGameButton.onClick.AddListener(EnterGame);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void EnterGame()
|
|
|
|
|
{
|
2025-07-26 04:20:25 -04:00
|
|
|
if (MenuManager.instance.songSelectionUIPage.songListController.selectedTab.isLocked)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-27 21:45:18 -04:00
|
|
|
if (MenuManager.instance.isEnteringGame)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MenuManager.instance.isEnteringGame = true;
|
|
|
|
|
|
2025-07-21 05:42:20 -04:00
|
|
|
InformationTransistor.instance.SetInformation(
|
|
|
|
|
ChapterSelectionManager.instance.currentChapter,
|
|
|
|
|
MenuManager.instance.songSelectionUIPage.selectedSong,
|
|
|
|
|
MenuManager.instance.songSelectionUIPage.selectedDifficulty);
|
2026-03-14 03:13:10 -04:00
|
|
|
AudioManager.Post(AK.EVENTS.ENTERTOGAME);
|
|
|
|
|
SongSelectionManager.instance.StopPreviewSong();
|
2025-07-21 05:42:20 -04:00
|
|
|
|
|
|
|
|
DOTween.KillAll();
|
|
|
|
|
|
|
|
|
|
Sequence arrowSeq = DOTween.Sequence();
|
|
|
|
|
|
|
|
|
|
foreach (var arrow in arrows)
|
|
|
|
|
{
|
|
|
|
|
arrowSeq.Join(arrow.DOAnchorPosX(-584.5f, 0.2f));
|
|
|
|
|
}
|
2025-08-22 14:54:40 -04:00
|
|
|
|
2025-07-21 05:42:20 -04:00
|
|
|
arrowSeq.OnComplete(() =>
|
|
|
|
|
{
|
2025-08-22 14:54:40 -04:00
|
|
|
MenuManager.instance.transitionUIPage.FadeIn();
|
|
|
|
|
Observable.Timer(TimeSpan.FromSeconds(0.6f)).Subscribe(_ =>
|
|
|
|
|
{
|
2025-09-06 21:58:48 -04:00
|
|
|
MenuManager.instance.EnterGame();
|
2025-08-22 14:54:40 -04:00
|
|
|
});
|
2025-07-21 05:42:20 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
arrowSeq.Play();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|