This commit is contained in:
SoulliesOfficial
2025-10-23 00:49:44 -04:00
parent 9b1b5ca93f
commit 61a397dd4c
9846 changed files with 2618439 additions and 793547 deletions

View File

@@ -1,4 +1,4 @@
using SoulliesFramework.General;
using SLSFramework.General;
using UnityEngine;
namespace Continentis.MainGame.UI

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic;
using Continentis.MainGame.Card;
using Lean.Common;
using Lean.Pool;
using SoulliesFramework.General;
using SLSFramework.General;
using UnityEngine;
namespace Continentis.MainGame.UI

View File

@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using SoulliesFramework.General;
using SLSFramework.General;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

View File

@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using Continentis.MainGame.Character;
using Lean.Pool;
using SLSFramework.General;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
@@ -11,13 +13,18 @@ namespace Continentis.MainGame.UI
public class HUD_CharacterBuffIcon : HUD_BaseIcon
{
public CharacterBuffBase buff;
public Image buffTypeBackground;
public Sprite positive;
public Sprite negative;
public Sprite neutral;
public void Initialize(CharacterBuffBase buff)
{
this.buff = buff;
buff.uiSubmodule.buffIcon = this;
buff.iconSubmodule.buffIcon = this;
icon.sprite = buff.uiSubmodule.icon;
icon.sprite = buff.iconSubmodule.icon;
UpdateIcon();
}
@@ -25,9 +32,12 @@ namespace Continentis.MainGame.UI
public override void UpdateIcon()
{
int index;
for (index = 0; index < buff.uiSubmodule.setTextFunctions.Count; index++)
List<string> synchronizedParameters = buff.iconSubmodule.synchronizedParameters;
for (index = 0; index < synchronizedParameters.Count; index++)
{
var func = buff.uiSubmodule.setTextFunctions[index];
string paramKey = synchronizedParameters[index];
Func<string> func = buff.contentSubmodule.parameterGetters[paramKey];
SetText(index, func);
}
@@ -38,6 +48,20 @@ namespace Continentis.MainGame.UI
textList[i].gameObject.SetActive(false);
}
}
buffTypeBackground.sprite = buff.buffType switch
{
BuffType.Positive => positive,
BuffType.Negative => negative,
BuffType.Neutral => neutral,
_ => buffTypeBackground.sprite
};
}
public void RemoveIcon()
{
buff.iconSubmodule.buffIcon = null;
LeanPool.Despawn(gameObject);
}
public override void OnPointerEnter(PointerEventData eventData)
@@ -46,9 +70,21 @@ namespace Continentis.MainGame.UI
RectTransform canvasTransform = CombatUIManager.Instance.hudPage.rectTransform;
infoBox = LeanPool.Spawn(infoBoxPrefab, canvasTransform).GetComponent<InformationBox>();
infoBox.Initialize(buff.name, buff.description, canvasTransform.InverseTransformPoint(rectTransform.position));
BuffTextInterpreter.InterpretText(buff);
string dispelThreshold = buff.dispelThreshold switch
{
BuffDispelLevel.Basic => "Buff_DispelThreshold_Basic_Suffix",
BuffDispelLevel.Strong => "Buff_DispelThreshold_Strong_Suffix",
BuffDispelLevel.Immune => "Buff_DispelThreshold_Immune_Suffix",
BuffDispelLevel.Undispellable => "Buff_DispelThreshold_Undispellable_Suffix",
_ => throw new ArgumentOutOfRangeException()
};
dispelThreshold = dispelThreshold.Localize();
string finalDescription = buff.contentSubmodule.interpretedFunctionText + "\n" + dispelThreshold;
infoBox.Initialize(buff.contentSubmodule.displayName, finalDescription, canvasTransform.InverseTransformPoint(rectTransform.position));
}
public override void OnPointerExit(PointerEventData eventData)
{
if (infoBox != null)