一些修复和优化

This commit is contained in:
FloatGaming
2026-07-20 02:22:51 +08:00
parent 818fc9a02f
commit 0a0872c4f4
49 changed files with 2008 additions and 262 deletions
+1 -1
View File
@@ -10967,7 +10967,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 8139719423079072813, guid: 16f0765cc15fce04f828ecd44d1dbf91, type: 3}
m_Sprite: {fileID: 21300000, guid: ddce9ea8759b6ca47b6d177982d1ed1e, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@@ -1,5 +1,6 @@
using UnityEngine;
using UnityEngine.UI;
using Bansonic;
public class uLevel_skills : MonoBehaviour
{
@@ -29,6 +30,8 @@ public class uLevel_skills : MonoBehaviour
private Color defaultNeedCoinsColor = Color.white;
private const int SkillSwitchCooldownMatches = 3;
private const int SkillSwitchMinimumCost = 200;
private const int ChallengerModelSkillIndex = 3;
private const string ChallengerModelBlockedMessage = "\u6682\u65f6\u65e0\u6cd5\u5207\u6362\u8fd9\u4e2a\u6280\u80fd";
private void Start()
{
@@ -101,6 +104,16 @@ public class uLevel_skills : MonoBehaviour
if (entry == null || !IsSkillUnlocked(entry))
return;
if (index == ChallengerModelSkillIndex)
{
gNotice.error.display(ChallengerModelBlockedMessage);
pendingSkillIndex = -1;
RefreshDetailPanel();
RefreshChangeUi();
RefreshStatusesOnly();
return;
}
int currentEnabledIndex = GetEnabledSkillIndex();
if (index == currentEnabledIndex)
{
@@ -255,6 +268,16 @@ public class uLevel_skills : MonoBehaviour
return;
}
if (pendingSkillIndex == ChallengerModelSkillIndex)
{
gNotice.error.display(ChallengerModelBlockedMessage);
pendingSkillIndex = -1;
RefreshStatusesOnly();
RefreshDetailPanel();
RefreshChangeUi();
return;
}
int switchCost = GetSkillSwitchCost();
bool spent = Application.isPlaying
? PlayerEconomyLedger.EnsureInstance().TrySpendCoins(switchCost)