update
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -39,10 +40,14 @@ namespace Ichni.Menu
|
||||
{
|
||||
arrowSeq.Join(arrow.DOAnchorPosX(-584.5f, 0.2f));
|
||||
}
|
||||
|
||||
|
||||
arrowSeq.OnComplete(() =>
|
||||
{
|
||||
MenuManager.instance.TestEnterGame();
|
||||
MenuManager.instance.transitionUIPage.FadeIn();
|
||||
Observable.Timer(TimeSpan.FromSeconds(0.6f)).Subscribe(_ =>
|
||||
{
|
||||
MenuManager.instance.TestEnterGame();
|
||||
});
|
||||
});
|
||||
|
||||
arrowSeq.Play();
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace Ichni.Menu
|
||||
|
||||
[Title("对齐与动画")]
|
||||
[SerializeField] public RectTransform centerPoint;
|
||||
[SerializeField] private float snapSpeed = 5f;
|
||||
[SerializeField] private float decelerationRate = 0.135f;
|
||||
[SerializeField] private float snapSpeed = 10f;
|
||||
[SerializeField] private float decelerationRate = 0.15f;
|
||||
|
||||
[Title("平滑度优化")]
|
||||
[SerializeField] [Range(1f, 20f)]
|
||||
@@ -263,7 +263,10 @@ namespace Ichni.Menu
|
||||
selectedTab?.SetSelection(false);
|
||||
selectedTab = null; // 清除当前选中的Tab
|
||||
|
||||
if(isDuringSnap && SnapCoroutine != null) StopCoroutine(SnapCoroutine);
|
||||
if (isDuringSnap && SnapCoroutine != null)
|
||||
{
|
||||
StopCoroutine(SnapCoroutine);
|
||||
}
|
||||
|
||||
SnapCoroutine = SnapToItem(tab.GetComponent<RectTransform>(), false);
|
||||
|
||||
@@ -289,8 +292,7 @@ namespace Ichni.Menu
|
||||
Vector3 closestItemLocalPos = viewport.InverseTransformPoint(targetItem.position);
|
||||
Vector3 centerPointLocalPos = viewport.InverseTransformPoint(centerPoint.position);
|
||||
float localOffsetY = centerPointLocalPos.y - closestItemLocalPos.y;
|
||||
|
||||
// 【核心修正 #3】吸附动画现在也是通过更新targetPosition来实现
|
||||
|
||||
Vector2 finalTargetPosition = content.anchoredPosition + new Vector2(0, localOffsetY);
|
||||
finalTargetPosition.y = Mathf.Clamp(finalTargetPosition.y, bottomBound, topBound);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
@@ -43,8 +44,17 @@ namespace Ichni.Menu
|
||||
{
|
||||
if (MenuManager.instance.songSelectionUIPage.songListController.selectedTab == this)
|
||||
{
|
||||
// MenuManager.instance.prepareUIPage.SetUpPrepareUIPage(song.songName);
|
||||
// MenuManager.instance.prepareUIPage.FadeIn();
|
||||
InformationTransistor.instance.SetInformation(
|
||||
ChapterSelectionManager.instance.currentChapter,
|
||||
MenuManager.instance.songSelectionUIPage.selectedSong,
|
||||
MenuManager.instance.songSelectionUIPage.selectedDifficulty);
|
||||
MenuAudioManager.instance.audioContainer.PlaySoundFX("EnterToGame");
|
||||
MenuAudioManager.instance.audioContainer.StopEvent("PlayPreview");
|
||||
MenuManager.instance.transitionUIPage.FadeIn();
|
||||
Observable.Timer(TimeSpan.FromSeconds(0.6f)).Subscribe(_ =>
|
||||
{
|
||||
MenuManager.instance.TestEnterGame();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user