彻底修好了
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c01a007da818c449aadaaadadade3f5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,16 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f22a23b9d98e440478697f4adf30e61c, type: 3}
|
||||
m_Name: UIParticleProjectSettings
|
||||
m_EditorClassIdentifier:
|
||||
m_EnableLinearToGamma: 1
|
||||
m_HideGeneratedObjects: 1
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09bfbde9d4ad0104bbf52c189f752401
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1394,8 +1394,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 700, y: 60}
|
||||
m_SizeDelta: {x: 160, y: 120}
|
||||
m_AnchoredPosition: {x: 750, y: 30}
|
||||
m_SizeDelta: {x: 100, y: 150}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &368630473
|
||||
MonoBehaviour:
|
||||
@@ -1417,7 +1417,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 3b3b06d10c4f32b40842e34efe4665ec, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: e47f953bc9832094182f2b452d77dade, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -1494,6 +1494,7 @@ MonoBehaviour:
|
||||
isTeam: 0
|
||||
button: {fileID: 368630475}
|
||||
buttonText: {fileID: 1783939752}
|
||||
teamPileText: {fileID: 833598973}
|
||||
--- !u!1 &373312357
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3523,7 +3524,7 @@ 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: 0, y: -40}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &833598973
|
||||
@@ -3546,7 +3547,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 0/10
|
||||
m_text: 10/10
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: ac4df5038ff71a34a993c7c9fa7316fd, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: 6f13eb00de36de84da30a9a284324eeb, type: 2}
|
||||
@@ -3573,8 +3574,8 @@ MonoBehaviour:
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 32
|
||||
m_fontSizeBase: 32
|
||||
m_fontSize: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
@@ -7140,7 +7141,7 @@ 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: 0, y: -5}
|
||||
m_AnchoredPosition: {x: 0, y: 40}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1783939752
|
||||
@@ -7190,8 +7191,8 @@ MonoBehaviour:
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 32
|
||||
m_fontSizeBase: 32
|
||||
m_fontSize: 28
|
||||
m_fontSizeBase: 28
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Combat;
|
||||
using Continentis.MainGame.UI;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
@@ -75,6 +76,12 @@ namespace Continentis.MainGame.Card
|
||||
{
|
||||
CardInstance cardInstance = new CardInstance(CardLogicBase.GenerateCardLogic(data), owner, pileName, index);
|
||||
cardInstance.cardLogic.Initialize();
|
||||
|
||||
if (owner == CombatMainManager.Instance.characterController.playerTeam)
|
||||
{
|
||||
CombatUIManager.Instance.combatMainPage.teamSwitchButton.UpdateTeamPileText(CombatMainManager.Instance.characterController.playerTeam);
|
||||
}
|
||||
|
||||
return cardInstance;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Combat;
|
||||
using Continentis.MainGame.UI;
|
||||
@@ -246,23 +247,22 @@ namespace Continentis.MainGame.Card
|
||||
return;
|
||||
}
|
||||
|
||||
if (!validTargets.Contains(hoveringCharacter))
|
||||
{
|
||||
// 当前鼠标悬停的目标不在有效目标列表中
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cardLogic.HasKeyword("TargetSelf"))
|
||||
{
|
||||
|
||||
if (!validTargets.Contains(hoveringCharacter))
|
||||
{
|
||||
// 当前鼠标悬停的目标不在有效目标列表中
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据目标类型,打出卡牌
|
||||
if (cardLogic.attributeSubmodule.targetCount == 1)
|
||||
{
|
||||
if (hoveringCharacter != null)
|
||||
if (hoveringCharacter != null && validTargets.Contains(hoveringCharacter))
|
||||
{
|
||||
if (!cardLogic.Play(new List<CharacterBase>() { CombatUIManager.Instance.hoveringCharacterView.character }))
|
||||
if (!cardLogic.Play(new List<CharacterBase>() { hoveringCharacter }))
|
||||
{
|
||||
cardLogic.eventSubmodule.onUntargeting();
|
||||
cardLogic.contentSubmodule.dirtyMark = true;
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace Continentis.MainGame.Combat
|
||||
{
|
||||
characterController.Initialize(MainGameManager.Instance.playerHeroDataList, MainGameManager.Instance.enemyDataList);
|
||||
StartCombat();
|
||||
CombatUIManager.Instance.UpdateAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ namespace Continentis.MainGame.UI
|
||||
|
||||
public bool isUpdatingLayout = true; // 是否启用自动布局更新
|
||||
public float arcAngle = 15; // 手牌的总弧度
|
||||
//public float cardSpacing = 150f; // 手牌间距
|
||||
public float cardSpacingBase = 100f; // 手牌间距
|
||||
public float cardSpacingFactor = 500f; // 手牌间距调整因子
|
||||
public float maxVerticalOffset = 50f; // 控制最外侧卡牌的垂直偏移
|
||||
|
||||
private void Update()
|
||||
@@ -25,7 +26,7 @@ namespace Continentis.MainGame.UI
|
||||
if (count == 0 || index < 0)
|
||||
return Vector2.zero;
|
||||
|
||||
float cardSpacing = 100f + 500f / count;
|
||||
float cardSpacing = cardSpacingBase + cardSpacingFactor / count;
|
||||
|
||||
// 计算中间索引,保证手牌居中排列
|
||||
float midIndex = (count - 1) / 2f;
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace Continentis.MainGame.UI
|
||||
public bool isTeam;
|
||||
public Button button;
|
||||
public TMP_Text buttonText;
|
||||
public TMP_Text teamPileText;
|
||||
private void Awake()
|
||||
{
|
||||
isTeam = false;
|
||||
@@ -25,11 +26,13 @@ namespace Continentis.MainGame.UI
|
||||
{
|
||||
SwitchToTeam();
|
||||
buttonText.text = "Team";
|
||||
teamPileText.gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SwitchToCurrentCharacter();
|
||||
buttonText.text = "Hero";
|
||||
teamPileText.gameObject.SetActive(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -74,5 +77,12 @@ namespace Continentis.MainGame.UI
|
||||
throw new Exception("当前角色不是玩家角色,无法显示卡牌。");
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateTeamPileText(CombatTeam team)
|
||||
{
|
||||
int currentCardCount = team.deckSubmodule.HandPile.Count;
|
||||
teamPileText.text = $"{currentCardCount}/10";
|
||||
Debug.Log($"Updated team pile text: {teamPileText.text}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Combat;
|
||||
using Continentis.MainGame.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
@@ -37,6 +38,11 @@ namespace Continentis.MainGame
|
||||
{
|
||||
return uiPageList.Count == 1 && uiPageList.Contains(combatMainPage);
|
||||
}
|
||||
|
||||
public void UpdateAll()
|
||||
{
|
||||
combatMainPage.teamSwitchButton.UpdateTeamPileText(CombatMainManager.Instance.characterController.playerTeam);
|
||||
}
|
||||
}
|
||||
|
||||
public partial class CombatUIManager
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Continentis.MainGame.UI
|
||||
{
|
||||
string paramKey = synchronizedParameters[index];
|
||||
Func<string> func = buff.contentSubmodule.parameterGetters[paramKey];
|
||||
Debug.Log($"Updating buff icon text for parameter {paramKey} with func is {func != null}");
|
||||
//Debug.Log($"Updating buff icon text for parameter {paramKey} with func is {func != null}");
|
||||
SetText(index, func);
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace SLSFramework.General
|
||||
isBusy = true;
|
||||
Tuple<CommandBase, CommandContext> nextEntry = commandQueue.First.Value;
|
||||
commandQueue.RemoveFirst();
|
||||
Debug.Log($"[Queue] 开始执行指令: {nextEntry.Item1.GetType()},队列剩余长度: {commandQueue.Count}");
|
||||
//Debug.Log($"[Queue] 开始执行指令: {nextEntry.Item1.GetType()},队列剩余长度: {commandQueue.Count}");
|
||||
var commandToExecute = nextEntry.Item1;
|
||||
var context = nextEntry.Item2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user