继续搞点新机制
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Continentis.MainGame.UI
|
||||
public List<TMP_Text> textList;
|
||||
public TMP_Text iconText => textList[0];
|
||||
|
||||
protected InformationBox infoBox;
|
||||
public InformationBox infoBox;
|
||||
|
||||
public virtual void UpdateIcon()
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace Continentis.MainGame.UI
|
||||
public CharacterBuffBase buff;
|
||||
|
||||
public Image buffTypeBackground;
|
||||
public Image mainIcon;
|
||||
|
||||
public Sprite positive;
|
||||
public Sprite negative;
|
||||
@@ -38,12 +37,13 @@ namespace Continentis.MainGame.UI
|
||||
|
||||
public void PlayApplyAnimation()
|
||||
{
|
||||
Image spreadImage = LeanPool.Spawn(mainIcon.gameObject, rectTransform).GetComponent<Image>();
|
||||
Image spreadImage = LeanPool.Spawn(MainGameManager.Instance.basePrefabs.customImage, rectTransform).GetComponent<Image>();
|
||||
spreadImage.sprite = buff.iconSubmodule.icon;
|
||||
spreadImage.rectTransform.rect.Set(0, 0, rectTransform.rect.width, rectTransform.rect.height);
|
||||
spreadImage.rectTransform.localScale = Vector3.zero;
|
||||
spreadImage.color = Color.white;
|
||||
spreadImage.DOColor(new Color(1f, 1f, 1f, 0f), 1.1f).SetEase(Ease.Linear).Play();
|
||||
spreadImage.rectTransform.DOScale(5f, 1.2f).SetEase(Ease.OutQuad).OnComplete(() =>
|
||||
spreadImage.rectTransform.DOScale(4f, 1.2f).SetEase(Ease.OutQuad).OnComplete(() =>
|
||||
{
|
||||
LeanPool.Despawn(spreadImage.gameObject);
|
||||
}).Play();
|
||||
@@ -51,7 +51,7 @@ namespace Continentis.MainGame.UI
|
||||
|
||||
public void PlayHintAnimation()
|
||||
{
|
||||
mainIcon.rectTransform.DOScale(1.25f, 0.2f).SetLoops(2, LoopType.Yoyo).SetEase(Ease.OutQuad).Play();
|
||||
icon.rectTransform.DOScale(1.25f, 0.2f).SetLoops(2, LoopType.Yoyo).SetEase(Ease.OutQuad).Play();
|
||||
}
|
||||
|
||||
public override void UpdateIcon()
|
||||
@@ -101,7 +101,7 @@ namespace Continentis.MainGame.UI
|
||||
{
|
||||
BuffDispelLevel.Basic => "Buff_DispelThreshold_Basic_Suffix",
|
||||
BuffDispelLevel.Strong => "Buff_DispelThreshold_Strong_Suffix",
|
||||
BuffDispelLevel.Immune => "Buff_DispelThreshold_Immune_Suffix",
|
||||
BuffDispelLevel.DeathOnly => "Buff_DispelThreshold_Immune_Suffix",
|
||||
BuffDispelLevel.Undispellable => "Buff_DispelThreshold_Undispellable_Suffix",
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
};
|
||||
@@ -109,10 +109,14 @@ namespace Continentis.MainGame.UI
|
||||
|
||||
string finalDescription = buff.contentSubmodule.interpretedFunctionText + "\n" + dispelThreshold;
|
||||
infoBox.Initialize(buff.contentSubmodule.displayName, finalDescription, canvasTransform.InverseTransformPoint(rectTransform.position));
|
||||
|
||||
Debug.Log("Pointer Enter Buff Icon");
|
||||
}
|
||||
|
||||
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