45 lines
984 B
C#
45 lines
984 B
C#
using Assets.Framework.Tool;
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
namespace Assets.MyGame.Scripts.Net.API.GameConfig_SubClass
|
|
{
|
|
/// <summary>
|
|
/// 道具碎片信息
|
|
/// </summary>
|
|
[Serializable]
|
|
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>
|
|
public int fragmentCount;
|
|
|
|
/// <summary>
|
|
/// 合成后的道具编号
|
|
/// </summary>
|
|
public string productNumber;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|