This commit is contained in:
2026-06-30 20:26:58 +08:00
parent 750ccf8847
commit d9f4f592ba
4 changed files with 153 additions and 5 deletions
@@ -1,4 +1,5 @@
using System;
using Assets.Framework.Tool;
using System;
using UnityEngine;
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
@@ -10,6 +11,19 @@ namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
public class PropFragmentConfig : BasePropInfo
{
public Sprite sprite_Icon;
public void GetSprite(Action<Sprite> callback)
{
if (sprite_Icon == null)
{
WebTool.DownImage(APIManager.baseURL + imageUrl, (a) => { sprite_Icon = Sprite.Create(a, new Rect(0, 0, a.width, a.height), Vector2.one * 0.5f); callback?.Invoke(sprite_Icon); });
}
else
{
callback?.Invoke(sprite_Icon);
}
}
/// <summary>
/// 合成所需碎片数量
/// </summary>