123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace ShadowStudio.Model
- {
- /// <summary>
- /// 美术资源实例化
- /// </summary>
- public interface ArtInstance
- {
- /// <summary>
- /// 初始化资源
- /// </summary>
- /// <param name="info"></param>
- void SetData(ArtInfo info, string containerName = "");
- /// <summary>
- /// 获取缩略图
- /// </summary>
- /// <returns></returns>
- Texture GetIcon();
- void GetIcon(Action<Texture> loadTex);
- /// <summary>
- /// 同步加载资源
- /// </summary>
- /// <returns></returns>
- UnityEngine.Object LoadArt();
- /// <summary>
- /// 异步加载资源
- /// </summary>
- /// <param name="path"></param>
- /// <param name="process"></param>
- /// <param name="loaded"></param>
- void LoadArtAsyn(string path, Action<float> process, Action<UnityEngine.Object> loaded);
- /// <summary>
- /// 实例化对象
- /// </summary>
- UnityEngine.Object InstanceArt();
- ArtComponent InstanceComponent();
- /// <summary>
- /// 是否已下载
- /// </summary>
- /// <returns></returns>
- bool IsDownLoad();
- void DownLoad(Action<float, float> downProcess, Action<string, byte[]> downComplete);
- float DownProcess { get; set; }
- }
- }
|