1
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user