一些修复和优化
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user