hold音符补丁 备份
This commit is contained in:
@@ -158,6 +158,241 @@ MonoBehaviour:
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u53D1\u884C\u65E5\u671F\uFF1A2026-66-66"
|
||||
--- !u!1 &1468656698895808366
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5888644841479767732}
|
||||
- component: {fileID: 2960304788727126542}
|
||||
- component: {fileID: 5368810222697972913}
|
||||
m_Layer: 5
|
||||
m_Name: detail
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5888644841479767732
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1468656698895808366}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1253227257531515220}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 323.3198, y: 55.2261}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2960304788727126542
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1468656698895808366}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5368810222697972913
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1468656698895808366}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: bd4be44636ad6c24a9b117a7108a75e9, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u6682\u672A\u627E\u5230\u7B80\u4ECB\u4FE1\u606F\u3002"
|
||||
--- !u!1 &2192019250287701500
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1253227257531515220}
|
||||
- component: {fileID: 5100036912783500580}
|
||||
- component: {fileID: 4385572967205360590}
|
||||
m_Layer: 5
|
||||
m_Name: detail
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1253227257531515220
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2192019250287701500}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1099650434260541262}
|
||||
- {fileID: 5888644841479767732}
|
||||
m_Father: {fileID: 5010078828579475845}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 73.32225}
|
||||
m_SizeDelta: {x: 355.2, y: 36.8645}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5100036912783500580
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2192019250287701500}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4385572967205360590
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2192019250287701500}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 7f3b1220317607e44bbb8f0e1998044a, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 2
|
||||
--- !u!1 &2238554210802163870
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1099650434260541262}
|
||||
- component: {fileID: 9202529557900048664}
|
||||
- component: {fileID: 3423794397929174540}
|
||||
m_Layer: 5
|
||||
m_Name: title
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1099650434260541262
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2238554210802163870}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1253227257531515220}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -82.58, y: 22.1}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9202529557900048664
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2238554210802163870}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3423794397929174540
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2238554210802163870}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: dfa10de3e2846524089b5073175cd151, type: 3}
|
||||
m_FontSize: 18
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u5173\u4E8E\u6B64DLC\u7684\u7B80\u4ECB\uFF1A"
|
||||
--- !u!1 &2704985786795051223
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -272,6 +507,8 @@ RectTransform:
|
||||
- {fileID: 333634122881333044}
|
||||
- {fileID: 3306384613169609027}
|
||||
- {fileID: 4819405071236471537}
|
||||
- {fileID: 2939871135262439914}
|
||||
- {fileID: 1253227257531515220}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
@@ -378,8 +615,10 @@ MonoBehaviour:
|
||||
dlcID: {fileID: 115205934777297662}
|
||||
dlcProducer: {fileID: 2931296379136689410}
|
||||
dlcPubliushDate: {fileID: 3713972282091736206}
|
||||
dlcSongsAmount: {fileID: 6445397485245527728}
|
||||
dlc_nowSelectedImageBoarder: {fileID: 2824183749825073581}
|
||||
dlcDescription: {fileID: 0}
|
||||
dlcDetailParent: {fileID: 2192019250287701500}
|
||||
dlcDescription: {fileID: 5368810222697972913}
|
||||
dlcDataSO: {fileID: 0}
|
||||
dlcContent:
|
||||
- {fileID: 0}
|
||||
@@ -397,6 +636,85 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 76ce63b908338a84c8a3aa071b90c46b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &5437805816395700444
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2939871135262439914}
|
||||
- component: {fileID: 5911944271956214811}
|
||||
- component: {fileID: 6445397485245527728}
|
||||
m_Layer: 5
|
||||
m_Name: songAmount
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2939871135262439914
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5437805816395700444}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5010078828579475845}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 156.45, y: 33.1}
|
||||
m_SizeDelta: {x: 36.6942, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5911944271956214811
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5437805816395700444}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6445397485245527728
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5437805816395700444}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: c1479b56d8329614e94637b5c5bafc87, type: 3}
|
||||
m_FontSize: 18
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 202
|
||||
--- !u!1 &6759998237426852132
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
public class dlcButton : MonoBehaviour
|
||||
public class dlcButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
[Header("Inspector")]
|
||||
public Image dlc_profileImgae;
|
||||
@@ -12,8 +13,10 @@ public class dlcButton : MonoBehaviour
|
||||
public Text dlcID;
|
||||
public Text dlcProducer;
|
||||
public Text dlcPubliushDate;
|
||||
public Text dlcSongsAmount;
|
||||
public Image dlc_nowSelectedImageBoarder;
|
||||
[Header("Inspector")]
|
||||
public GameObject dlcDetailParent;
|
||||
public Text dlcDescription;
|
||||
|
||||
[Header("Inspector")]
|
||||
@@ -42,8 +45,57 @@ public class dlcButton : MonoBehaviour
|
||||
private static int selectedIndex = -1;
|
||||
private const string PlayerPrefsKey = "dlc_selected_index";
|
||||
|
||||
// instance index in registration order
|
||||
private int instanceIndex = -1;
|
||||
private Coroutine hoverCoroutine;
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (hoverCoroutine != null) StopCoroutine(hoverCoroutine);
|
||||
hoverCoroutine = StartCoroutine(HandleHover());
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (hoverCoroutine != null) StopCoroutine(hoverCoroutine);
|
||||
if (dlcDetailParent != null) dlcDetailParent.SetActive(false);
|
||||
}
|
||||
|
||||
private IEnumerator HandleHover()
|
||||
{
|
||||
yield return new WaitForSecondsRealtime(0.5f);
|
||||
|
||||
// 尝试从场景中查找 dlcDetailParent (如果自身引用的为空)
|
||||
if (dlcDetailParent == null)
|
||||
{
|
||||
var details = GameObject.FindObjectsByType<dlcButton>(FindObjectsInactive.Include, FindObjectsSortMode.None);
|
||||
foreach (var b in details)
|
||||
{
|
||||
if (b != this && b.dlcDetailParent != null)
|
||||
{
|
||||
dlcDetailParent = b.dlcDetailParent;
|
||||
dlcDescription = b.dlcDescription;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dlcDetailParent != null)
|
||||
{
|
||||
dlcDetailParent.SetActive(true);
|
||||
// 更新简介信息
|
||||
if (dlcDescription != null)
|
||||
{
|
||||
if (dlcDataSO != null)
|
||||
{
|
||||
dlcDescription.text = string.IsNullOrEmpty(dlcDataSO.dlcDescription) ? "暂无DLC简介信息。" : dlcDataSO.dlcDescription;
|
||||
}
|
||||
else
|
||||
{
|
||||
dlcDescription.text = "暂无DLC简介信息。";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
@@ -374,6 +426,11 @@ public class dlcButton : MonoBehaviour
|
||||
if (s != null) dlcContent.Add(s);
|
||||
}
|
||||
|
||||
if (dlcSongsAmount != null)
|
||||
{
|
||||
dlcSongsAmount.text = dlcContent.Count.ToString();
|
||||
}
|
||||
|
||||
if (dlcName != null) dlcName.text = so.dlcName ?? dlcName.text;
|
||||
if (dlcProducer != null) dlcProducer.text = so.dlcProducer ?? dlcProducer.text;
|
||||
if (dlcDescription != null) dlcDescription.text = so.dlcDescription ?? dlcDescription.text;
|
||||
|
||||
@@ -487,7 +487,16 @@ public class selected_songInfo : MonoBehaviour
|
||||
|
||||
private void UpdateMusicPlaybackProgress()
|
||||
{
|
||||
if (preListenAS == null || preListenAS.clip == null || !preListenAS.isPlaying) return;
|
||||
if (preListenAS == null || preListenAS.clip == null) return;
|
||||
|
||||
// 检查是否自然播放结束
|
||||
if (!preListenAS.isPlaying && preListenAS.time >= preListenAS.clip.length * 0.99f)
|
||||
{
|
||||
StopPlayback();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!preListenAS.isPlaying) return;
|
||||
|
||||
// 如果用户没在拖动,则自动更新进度条
|
||||
if (!Input.GetMouseButton(0))
|
||||
|
||||
Reference in New Issue
Block a user