From 3f2cd27c5dfb3b450245bf1a37fc1b3414031c7c Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 11 二月 2026 11:03:58 +0800
Subject: [PATCH] 小游戏适配 资源系统改造

---
 Main/System/PhantasmPavilion/PhantasmPavilionManager.cs |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
index 52ce53f..984f6ca 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using UnityEngine;
+using Cysharp.Threading.Tasks;
 
 public partial class PhantasmPavilionManager : GameSystemManager<PhantasmPavilionManager>
 {
@@ -228,6 +229,41 @@
 
     }
 
+    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();

--
Gitblit v1.8.0