很多更新,服务端连接,新UI和系统
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
@@ -22,6 +23,11 @@ public class eqpmtDesPrefab : MonoBehaviour
|
||||
public Image eqpmtBtm;
|
||||
public Sprite[] eqpmtBtmSprites;
|
||||
|
||||
[Header("spine particles")]
|
||||
public GameObject golden_particle;
|
||||
public GameObject red_particle;
|
||||
public GameObject pink_particle;
|
||||
|
||||
[Header("head")]
|
||||
public Text eqpmtName;
|
||||
public Text eqpmtID;
|
||||
@@ -153,6 +159,7 @@ public class eqpmtDesPrefab : MonoBehaviour
|
||||
|
||||
if (eSO == null)
|
||||
{
|
||||
ApplySpineParticles(null);
|
||||
ApplyHeader(string.Empty, null, 0, string.Empty);
|
||||
ApplyBasicSection(string.Empty, false);
|
||||
ApplyEffectSection(saTitle, saDetail, saSpace, sasParent, string.Empty, null, false);
|
||||
@@ -172,6 +179,7 @@ public class eqpmtDesPrefab : MonoBehaviour
|
||||
Sprite displaySprite = presentation != null ? presentation.equipmentSprite : null;
|
||||
string description = eSO.GetDisplayTierDescription();
|
||||
|
||||
ApplySpineParticles(eSO);
|
||||
ApplyHeader(displayName, displaySprite, GetQualityVisualIndex(eSO), description);
|
||||
ApplyEquipperInfo(eSO);
|
||||
string basicText = BuildBasicAttributesText(eSO);
|
||||
@@ -227,6 +235,70 @@ public class eqpmtDesPrefab : MonoBehaviour
|
||||
displayMaxLevelEffects && HasSectionContent(eSO.maxLevelEffects, 0));
|
||||
}
|
||||
|
||||
private void ApplySpineParticles(equipmentSO equipment)
|
||||
{
|
||||
bool showGolden = false;
|
||||
bool showRed = false;
|
||||
bool showPink = false;
|
||||
|
||||
if (equipment != null)
|
||||
{
|
||||
int level = Mathf.Max(0, equipment.level);
|
||||
bool hasFinalDreamEffect = equipment.HasFinalDreamEffect();
|
||||
|
||||
if (level >= 20 && hasFinalDreamEffect)
|
||||
{
|
||||
showPink = true;
|
||||
}
|
||||
else if (level >= 15)
|
||||
{
|
||||
showRed = true;
|
||||
}
|
||||
else if (level >= 10)
|
||||
{
|
||||
showGolden = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (golden_particle != null)
|
||||
{
|
||||
golden_particle.SetActive(showGolden);
|
||||
}
|
||||
|
||||
if (red_particle != null)
|
||||
{
|
||||
red_particle.SetActive(showRed);
|
||||
}
|
||||
|
||||
if (pink_particle != null)
|
||||
{
|
||||
pink_particle.SetActive(showPink);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void ConfigureSpineParticleRenderers(GameObject target)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SkeletonGraphic[] skeletonGraphics = target.GetComponentsInChildren<SkeletonGraphic>(true);
|
||||
for (int i = 0; i < skeletonGraphics.Length; i++)
|
||||
{
|
||||
SkeletonGraphic skeletonGraphic = skeletonGraphics[i];
|
||||
if (skeletonGraphic == null || skeletonGraphic.allowMultipleCanvasRenderers)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
skeletonGraphic.allowMultipleCanvasRenderers = true;
|
||||
skeletonGraphic.Initialize(true);
|
||||
skeletonGraphic.SetMaterialDirty();
|
||||
skeletonGraphic.SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
private void ApplyEquipperInfo(equipmentSO equipment)
|
||||
{
|
||||
AllyHero_SO equipper = FindEquipper(equipment);
|
||||
@@ -775,3 +847,5 @@ public class eqpmtDesPrefab : MonoBehaviour
|
||||
equipment.name.Contains("(TourPreview)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user