修了不少东西

This commit is contained in:
FloatGaming
2026-07-16 23:04:59 +08:00
parent 29972d0705
commit 73fe474cc6
134 changed files with 7673 additions and 741 deletions
+29 -2
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Bansonic;
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
@@ -11,6 +12,8 @@ using UnityEditor;
public class UI_Idols : MonoBehaviour
{
private const string MemorySystemComingSoonMessage = "\"记忆\"系统即将上线,敬请期待!";
[Header("quit")]
public Button quitButton;
@@ -265,13 +268,20 @@ public class UI_Idols : MonoBehaviour
if (isOn)
{
if (source == idolWeaponToggle)
{
ShowMemorySystemComingSoon();
ApplySectionSelection(GetFirstAvailableUnlockedToggle());
return;
}
ApplySectionSelection(source);
return;
}
if (!AnySectionToggleOn())
{
ApplySectionSelection(idolLevelsToggle != null ? idolLevelsToggle : GetFirstAvailableToggle());
ApplySectionSelection(GetFirstAvailableUnlockedToggle());
}
else
{
@@ -281,7 +291,9 @@ public class UI_Idols : MonoBehaviour
private void ApplySectionSelection(Toggle activeToggle)
{
Toggle resolved = activeToggle != null ? activeToggle : (idolLevelsToggle != null ? idolLevelsToggle : GetFirstAvailableToggle());
Toggle resolved = activeToggle != null && activeToggle != idolWeaponToggle
? activeToggle
: GetFirstAvailableUnlockedToggle();
suppressToggleCallbacks = true;
SetToggleState(idolLevelsToggle, resolved == idolLevelsToggle);
@@ -326,6 +338,21 @@ public class UI_Idols : MonoBehaviour
return null;
}
private Toggle GetFirstAvailableUnlockedToggle()
{
if (idolLevelsToggle != null) return idolLevelsToggle;
if (idolVoicesToggle != null) return idolVoicesToggle;
if (idolDetailPassageToggle != null) return idolDetailPassageToggle;
if (idolSkillsToggle != null) return idolSkillsToggle;
if (idolSkinsToggle != null) return idolSkinsToggle;
return null;
}
private static void ShowMemorySystemComingSoon()
{
gNotice.error.display(MemorySystemComingSoonMessage);
}
private static void SetToggleState(Toggle toggle, bool isOn)
{
if (toggle == null)
+21 -6
View File
@@ -1667,6 +1667,7 @@ GameObject:
- component: {fileID: 3829753781754538968}
- component: {fileID: 8946417172749083411}
- component: {fileID: 4552225134849151602}
- component: {fileID: 2952962603515858014}
m_Layer: 5
m_Name: description
m_TagString: Untagged
@@ -1690,9 +1691,9 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 145.415, y: -30}
m_SizeDelta: {x: 280.83, y: 54}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 140.76392, y: -3}
m_SizeDelta: {x: 271.5281, y: 54}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &8946417172749083411
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -1722,7 +1723,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: d254d20d93651ae448ff13d10dff30ab, type: 3}
m_Font: {fileID: 12800000, guid: bc54bd51ea8b84448ba1b65311872862, type: 3}
m_FontSize: 18
m_FontStyle: 0
m_BestFit: 0
@@ -1734,7 +1735,21 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u6280\u80FD\u4ECB\u7ECD\n1\n"
m_Text: "\u6280\u80FD\u4ECB\u7ECD\n\u5927\u5BB6\u597D\u8FD9\u91CC\u662F\u6280\u80FD\u4ECB\u7ECD\n\u4F60\u600E\u4E48\u770B\u5230\u8FD9\u53E5\u8BDD"
--- !u!114 &2952962603515858014
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5833502104821601462}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!1 &6549684703952493889
GameObject:
m_ObjectHideFlags: 0
@@ -1801,7 +1816,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: bd4be44636ad6c24a9b117a7108a75e9, type: 3}
m_Font: {fileID: 12800000, guid: d254d20d93651ae448ff13d10dff30ab, type: 3}
m_FontSize: 16
m_FontStyle: 0
m_BestFit: 0
+3 -3
View File
@@ -255,7 +255,7 @@ public class idolUpgrade : MonoBehaviour
prefix += "<color=#FF4D4D>所选两项材料为一组,</color>";
}
SetInfoText(string.Format("{0}突破需消耗 {1} 金币", prefix, GetEffectiveBreakthroughCoinCost()));
SetInfoText(string.Format("{0}突破需消耗 {1} 算力", prefix, GetEffectiveBreakthroughCoinCost()));
SetConfirmInteractable(true);
SetConfirmButtonText("突破");
return;
@@ -997,7 +997,7 @@ public class idolUpgrade : MonoBehaviour
int requiredCoins = GetEffectiveBreakthroughCoinCost();
if (!PlayerEconomyLedger.EnsureInstance().HasEnoughCoins(requiredCoins))
{
failureReason = "金币不足";
failureReason = "算力不足";
return false;
}
@@ -1017,7 +1017,7 @@ public class idolUpgrade : MonoBehaviour
if (!PlayerEconomyLedger.EnsureInstance().TrySpendCoins(requiredCoins))
{
failureReason = "金币不足";
failureReason = "算力不足";
return false;
}