12.10 进度 基本完成
This commit is contained in:
@@ -12,8 +12,6 @@ namespace Continentis.MainGame.UI
|
||||
public Image icon;
|
||||
public List<TMP_Text> textList;
|
||||
public TMP_Text iconText => textList[0];
|
||||
|
||||
public InformationBox infoBox;
|
||||
|
||||
public virtual void UpdateIcon()
|
||||
{
|
||||
|
||||
@@ -95,14 +95,6 @@ namespace Continentis.MainGame.UI
|
||||
|
||||
public override void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
GameObject infoBoxPrefab = MainGameManager.Instance.basePrefabs.informationBox;
|
||||
RectTransform canvasTransform = CombatUIManager.Instance.hudPage.rectTransform;
|
||||
|
||||
if (infoBox == null)
|
||||
{
|
||||
infoBox = LeanPool.Spawn(infoBoxPrefab, canvasTransform).GetComponent<InformationBox>();
|
||||
}
|
||||
|
||||
BuffTextInterpreter.InterpretText(buff);
|
||||
string dispelThreshold = buff.dispelThreshold switch
|
||||
{
|
||||
@@ -115,16 +107,14 @@ namespace Continentis.MainGame.UI
|
||||
dispelThreshold = dispelThreshold.Localize();
|
||||
|
||||
string finalDescription = buff.contentSubmodule.interpretedFunctionText + "\n" + dispelThreshold;
|
||||
Vector2 basePosition = canvasTransform.InverseTransformPoint(rectTransform.position);
|
||||
infoBox.Initialize(buff.contentSubmodule.displayName, finalDescription, basePosition);
|
||||
|
||||
Debug.Log("Pointer Enter Buff Icon");
|
||||
RectTransform canvasTransform = CombatUIManager.Instance.hudPage.rectTransform;
|
||||
Vector2 basePosition = canvasTransform.InverseTransformPoint(rectTransform.position);
|
||||
InformationBox.Create(canvasTransform, ref infoBox).Initialize(buff.contentSubmodule.displayName, finalDescription, basePosition);
|
||||
}
|
||||
|
||||
public override void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
Debug.Log("Pointer Exit Buff Icon");
|
||||
|
||||
if (infoBox != null)
|
||||
{
|
||||
LeanPool.Despawn(infoBox.gameObject);
|
||||
|
||||
Reference in New Issue
Block a user