Files
5.24BuYu/Assets/MyGame/Scripts/Net/APIResponses/GameConfig_SubClass/PropFragmentConfig.cs
T

45 lines
984 B
C#
Raw Normal View History

2026-06-30 20:26:58 +08:00
using Assets.Framework.Tool;
using System;
2026-04-13 18:30:55 +08:00
using UnityEngine;
2026-02-03 11:35:19 +08:00
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
{
/// <summary>
/// 道具碎片信息
/// </summary>
[Serializable]
public class PropFragmentConfig : BasePropInfo
{
2026-04-13 18:30:55 +08:00
public Sprite sprite_Icon;
2026-06-30 20:26:58 +08:00
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);
}
}
2026-02-03 11:35:19 +08:00
/// <summary>
/// 合成所需碎片数量
/// </summary>
public int fragmentCount;
/// <summary>
/// 合成后的道具编号
/// </summary>
public string productNumber;
}
}