| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | public partial class PhantasmPavilionManager : GameSystemManager<PhantasmPavilionManager> |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | public async UniTask ShowFaceAsync(ImageEx imgFace, UIEffectPlayer spine, UIFrame uiFrame, EllipseMask ellipseMask, int id) |
| | | { |
| | | PhantasmPavilionType type = PhantasmPavilionType.Face; |
| | | int UnlockWay = GetUnlockWay(type, id); |
| | | int unlockValue = GetUnlockValue(type, id); |
| | | int resourceType = GetResourceType(type, id); |
| | | string resourceValue = GetResourceValue(type, id); |
| | | if (UnlockWay == 3 && resourceValue == "") |
| | | { |
| | | int heroID = unlockValue; |
| | | if (!HeroConfig.HasKey(heroID)) |
| | | return; |
| | | HeroConfig heroConfig = HeroConfig.Get(heroID); |
| | | int skinID = heroConfig.SkinIDList[0]; |
| | | if (!HeroSkinConfig.HasKey(skinID)) |
| | | return; |
| | | HeroSkinConfig skinConfig = HeroSkinConfig.Get(skinID); |
| | | var sprite = await UILoader.LoadSpriteAsync("HeroHead", skinConfig.SquareIcon); |
| | | if (sprite == null) |
| | | { |
| | | Show(imgFace, spine, uiFrame, resourceType, "herohead_default", null, ellipseMask); |
| | | } |
| | | else |
| | | { |
| | | Show(imgFace, spine, uiFrame, resourceType, string.Empty, sprite, ellipseMask); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | resourceValue = GetResourceValue(type, id); |
| | | Show(imgFace, spine, uiFrame, resourceType, resourceValue, null, ellipseMask); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void Show(ImageEx imgFace, UIEffectPlayer spine, UIFrame uiFrame, int resourceType, string resourceValue, Sprite sprite = null, EllipseMask ellipseMask = null) |
| | | { |
| | | spine.Stop(); |