更新,spine和很多优化
This commit is contained in:
@@ -75,6 +75,81 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &280150709295593380
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2318280567031044456}
|
||||
- component: {fileID: 1023961900524064665}
|
||||
- component: {fileID: 2438452334951697137}
|
||||
m_Layer: 0
|
||||
m_Name: wenhao
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &2318280567031044456
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 280150709295593380}
|
||||
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: 4008714089197239054}
|
||||
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: 1920, y: 1080}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1023961900524064665
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 280150709295593380}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2438452334951697137
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 280150709295593380}
|
||||
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: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 0
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &406175461848920595
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -109,8 +184,8 @@ RectTransform:
|
||||
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: 63.8, y: -8.5}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_AnchoredPosition: {x: 15.268383, y: 0}
|
||||
m_SizeDelta: {x: 88.937, y: 30.263}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8834825946409292425
|
||||
CanvasRenderer:
|
||||
@@ -147,13 +222,13 @@ MonoBehaviour:
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 114514
|
||||
m_Text: NaN
|
||||
--- !u!1 &438562227820009306
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1005,6 +1080,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 291470585847424768}
|
||||
- component: {fileID: 8373938424588989755}
|
||||
m_Layer: 5
|
||||
m_Name: MusicPic
|
||||
m_TagString: Untagged
|
||||
@@ -1055,6 +1131,24 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: -628.13, y: -267.01}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &8373938424588989755
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1162878931044217181}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 99786ec25b14ff7428d7f2ced0b24b89, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
guide: {fileID: 0}
|
||||
entry:
|
||||
path: MusicPic
|
||||
text: "\u8FD9\u4E9B\u662F\u6211\u4ECE\u623F\u95F4\u91CC\u641C\u96C6\u6765\u7684\uFF0C\u60A8\u6311\u4E24\u9996\uFF1F\u4E0D\u5FC5\u5728\u610F\u6211\u5BF9\u60A8\u54C1\u5473\u7684\u770B\u6CD5\u3002\u4E0D\u8FC7\u5728\u67D0\u4E9B\u60C5\u51B5\u4E0B...\u6211\u662F\u4F1A\u5207\u6389\u7684\u54E6\u3002"
|
||||
iconPath: "Assets/artworks/Ul_Ul/\u65B0\u7248\u4E3B\u754C\u9762\uFF082\uFF09/\u97F3\u4E50"
|
||||
icon: {fileID: 7605814977653748970, guid: fd7da29c38f47ea4695ec23268ebdd9d, type: 3}
|
||||
--- !u!1 &1207165874131126891
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3396,7 +3490,7 @@ MonoBehaviour:
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Outline
|
||||
m_Text: "\u79BB\u7EBF\u6A21\u5F0F"
|
||||
--- !u!1 &3339318652266806984
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4339,6 +4433,7 @@ RectTransform:
|
||||
- {fileID: 6434860682258445909}
|
||||
- {fileID: 5634981615641515618}
|
||||
- {fileID: 291470585847424768}
|
||||
- {fileID: 2318280567031044456}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -4412,6 +4507,20 @@ MonoBehaviour:
|
||||
showLevel_display: {fileID: 5868241863521704767}
|
||||
email_display: {fileID: 7520904819348953829}
|
||||
notice_display: {fileID: 920723299105391293}
|
||||
market_launch: {fileID: 5379967691629323644}
|
||||
userGuideButton: {fileID: 6945238783669072533}
|
||||
guideDisplayImage: {fileID: 2438452334951697137}
|
||||
guideMappings:
|
||||
- sceneName: UI_UI
|
||||
guideSprite: {fileID: 0}
|
||||
- sceneName: selectYourSongFirst
|
||||
guideSprite: {fileID: 0}
|
||||
- sceneName: Songs_Select
|
||||
guideSprite: {fileID: 0}
|
||||
- sceneName: gamePlay_gamePlay
|
||||
guideSprite: {fileID: 0}
|
||||
- sceneName:
|
||||
guideSprite: {fileID: 0}
|
||||
button_Music: {fileID: 5472029888669800656}
|
||||
musicPicRoot: {fileID: 0}
|
||||
showMusicPicInUI: 1
|
||||
@@ -4428,6 +4537,22 @@ MonoBehaviour:
|
||||
settings_navButton: {fileID: 0}
|
||||
homeSceneName: UI_UI
|
||||
backFallbackSceneName: Main_main
|
||||
navigationRules:
|
||||
- sceneName: UI_UI
|
||||
backTargetScene: Main_main
|
||||
depth: 0
|
||||
- sceneName: selectYourSongFirst
|
||||
backTargetScene: UI_UI
|
||||
depth: 1
|
||||
- sceneName: Songs_Select
|
||||
backTargetScene: selectYourSongFirst
|
||||
depth: 2
|
||||
- sceneName: gamePlay_gamePlay
|
||||
backTargetScene: selectYourSongFirst
|
||||
depth: 3
|
||||
- sceneName:
|
||||
backTargetScene:
|
||||
depth: 4
|
||||
--- !u!114 &2510911207525280717
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4937,8 +5062,8 @@ RectTransform:
|
||||
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: 6.300003, y: -29.900002}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_AnchoredPosition: {x: -68.0999, y: -29.900002}
|
||||
m_SizeDelta: {x: 222.8, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6137481741208887361
|
||||
CanvasRenderer:
|
||||
@@ -4969,19 +5094,19 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: dfa10de3e2846524089b5073175cd151, type: 3}
|
||||
m_FontSize: 30
|
||||
m_Font: {fileID: 12800000, guid: bc54bd51ea8b84448ba1b65311872862, type: 3}
|
||||
m_FontSize: 24
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: XXXX
|
||||
m_Text: username
|
||||
--- !u!1 &5909026714256705340
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -6655,8 +6780,8 @@ RectTransform:
|
||||
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: 63.8, y: -8.5}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_AnchoredPosition: {x: 18.268383, y: -0.00012207031}
|
||||
m_SizeDelta: {x: 82.937, y: 30.263}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9087867391651096042
|
||||
CanvasRenderer:
|
||||
@@ -6693,13 +6818,13 @@ MonoBehaviour:
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 114514
|
||||
m_Text: NaN
|
||||
--- !u!1 &7869453618975110451
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -7740,11 +7865,11 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: dfa10de3e2846524089b5073175cd151, type: 3}
|
||||
m_FontSize: 36
|
||||
m_Font: {fileID: 12800000, guid: bc54bd51ea8b84448ba1b65311872862, type: 3}
|
||||
m_FontSize: 24
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 61
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
|
||||
@@ -3,6 +3,7 @@ using UnityEngine.UI;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.SceneManagement;
|
||||
using System.Collections.Generic;
|
||||
using Bansonic;
|
||||
|
||||
public class btmandtopController : MonoBehaviour
|
||||
{
|
||||
@@ -17,6 +18,19 @@ public class btmandtopController : MonoBehaviour
|
||||
public Button showLevel_display;
|
||||
public Button email_display;
|
||||
public Button notice_display;
|
||||
public Button market_launch;
|
||||
|
||||
[Header("User Guide")]
|
||||
[SerializeField] private Button userGuideButton;
|
||||
[SerializeField] private Image guideDisplayImage;
|
||||
[SerializeField] private List<GuideMapping> guideMappings;
|
||||
|
||||
[System.Serializable]
|
||||
public struct GuideMapping
|
||||
{
|
||||
public string sceneName;
|
||||
public Sprite guideSprite;
|
||||
}
|
||||
|
||||
public Button button_Music;
|
||||
[Header("MusicPic")]
|
||||
@@ -40,6 +54,20 @@ public class btmandtopController : MonoBehaviour
|
||||
[SerializeField] private string homeSceneName = "UI_UI";
|
||||
[SerializeField] private string backFallbackSceneName = "Main_main";
|
||||
|
||||
[Header("Scene Navigation Rules")]
|
||||
[Tooltip("Define explicit back-navigation targets for specific scenes. This overrides the history-based navigation.")]
|
||||
[SerializeField] private List<SceneNavigationRule> navigationRules;
|
||||
|
||||
[System.Serializable]
|
||||
public struct SceneNavigationRule
|
||||
{
|
||||
public string sceneName;
|
||||
[Tooltip("The scene to return to. If empty, falls back to history.")]
|
||||
public string backTargetScene;
|
||||
[Tooltip("Optional: Visual depth indicator (0=Root, 1=Chapter, etc)")]
|
||||
public int depth;
|
||||
}
|
||||
|
||||
private UnityAction instantiateSettings;
|
||||
private UnityAction instantiateUserInfo;
|
||||
private UnityAction instantiateStore;
|
||||
@@ -49,6 +77,8 @@ public class btmandtopController : MonoBehaviour
|
||||
private UnityAction navBackAction;
|
||||
private UnityAction navHomeAction;
|
||||
private UnityAction navSettingsAction;
|
||||
private UnityAction navGuideAction;
|
||||
private UnityAction instantiateMarket;
|
||||
|
||||
// cached reference to the settings instance to ensure only one exists
|
||||
private GameObject settingsInstance;
|
||||
@@ -84,11 +114,16 @@ public class btmandtopController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
instantiateSettings = () => ToggleSettingsPrefab();
|
||||
instantiateUserInfo = () => InstantiatePrefab(userInfo_prefab);
|
||||
instantiateUserInfo = () => { gNotice.recommendation.display("功能即将上线,敬请期待"); };
|
||||
instantiateStore = () => InstantiatePrefab(store_prefab);
|
||||
instantiateShowLevel = () => ShowLevelPrefab();
|
||||
instantiateEmail = () => ShowEmailPrefab();
|
||||
instantiateNotice = () => ShowNoticePrefab();
|
||||
instantiateShowLevel = () => { gNotice.error.display("功能即将下线,禁止访问"); };
|
||||
// instantiateShowLevel = () => ShowLevelPrefab();
|
||||
instantiateEmail = () => { gNotice.warning.display("此版本该功能暂不可用"); };
|
||||
// instantiateEmail = () => ShowEmailPrefab();
|
||||
instantiateNotice = () => { gNotice.warning.display("此版本该功能暂不可用"); };
|
||||
// instantiateNotice = () => ShowNoticePrefab();
|
||||
navGuideAction = () => ToggleGuideDisplay();
|
||||
instantiateMarket = () => { gNotice.alarm.display("商店未开放"); };
|
||||
|
||||
if (settings_launch != null)
|
||||
settings_launch.onClick.AddListener(instantiateSettings);
|
||||
@@ -102,6 +137,10 @@ public class btmandtopController : MonoBehaviour
|
||||
email_display.onClick.AddListener(instantiateEmail);
|
||||
if (notice_display != null)
|
||||
notice_display.onClick.AddListener(instantiateNotice);
|
||||
if (market_launch != null)
|
||||
market_launch.onClick.AddListener(instantiateMarket);
|
||||
if (userGuideButton != null)
|
||||
userGuideButton.onClick.AddListener(navGuideAction);
|
||||
|
||||
BindNewBackButtons();
|
||||
|
||||
@@ -328,6 +367,10 @@ public class btmandtopController : MonoBehaviour
|
||||
email_display.onClick.RemoveListener(instantiateEmail);
|
||||
if (notice_display != null)
|
||||
notice_display.onClick.RemoveListener(instantiateNotice);
|
||||
if (market_launch != null)
|
||||
market_launch.onClick.RemoveListener(instantiateMarket);
|
||||
if (userGuideButton != null)
|
||||
userGuideButton.onClick.RemoveListener(navGuideAction);
|
||||
|
||||
if (button_Music != null)
|
||||
button_Music.onClick.RemoveListener(ToggleMusicPicLocal);
|
||||
@@ -340,6 +383,46 @@ public class btmandtopController : MonoBehaviour
|
||||
settings_navButton.onClick.RemoveListener(navSettingsAction);
|
||||
}
|
||||
|
||||
private void ToggleGuideDisplay()
|
||||
{
|
||||
if (guideDisplayImage == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (guideDisplayImage.gameObject.activeSelf)
|
||||
{
|
||||
guideDisplayImage.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
string currentScene = SceneManager.GetActiveScene().name;
|
||||
Sprite targetSprite = null;
|
||||
|
||||
if (guideMappings != null)
|
||||
{
|
||||
foreach (var mapping in guideMappings)
|
||||
{
|
||||
if (mapping.sceneName == currentScene)
|
||||
{
|
||||
targetSprite = mapping.guideSprite;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetSprite != null)
|
||||
{
|
||||
guideDisplayImage.sprite = targetSprite;
|
||||
guideDisplayImage.gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
gNotice.warning.display("未找到指引信息");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleSettingsPrefab()
|
||||
{
|
||||
if (settings_prefab == null || putPrefabsHere == null) return;
|
||||
@@ -608,7 +691,28 @@ public class btmandtopController : MonoBehaviour
|
||||
InitializeSceneHistoryIfNeeded();
|
||||
|
||||
string current = SceneManager.GetActiveScene().name ?? string.Empty;
|
||||
string target = PopPreviousSceneName(current);
|
||||
string target = null;
|
||||
|
||||
if (navigationRules != null)
|
||||
{
|
||||
foreach (var rule in navigationRules)
|
||||
{
|
||||
if (string.Equals(rule.sceneName, current, System.StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(rule.backTargetScene))
|
||||
{
|
||||
target = rule.backTargetScene;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(target))
|
||||
{
|
||||
target = PopPreviousSceneName(current);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(target))
|
||||
{
|
||||
target = string.IsNullOrEmpty(backFallbackSceneName) ? "Main_main" : backFallbackSceneName;
|
||||
|
||||
Reference in New Issue
Block a user