ArtComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace ShadowStudio.Model
  5. {
  6. /// <summary>
  7. /// 美术资源的组件接口
  8. /// 组件依附于容器,并扩展容器的初始化接口
  9. /// 组件可能是文本,视频窗口,图片容器等等
  10. /// </summary>
  11. public interface ArtComponent
  12. {
  13. /// <summary>
  14. /// 初始化容器
  15. /// </summary>
  16. /// <param name="art"></param>
  17. /// <param name="info"></param>
  18. void SetContainer(ArtContainerHandler container,UnityEngine.Object art, ArtInfo info);
  19. /// <summary>
  20. /// 容器的同步
  21. /// </summary>
  22. /// <param name="goods"></param>
  23. /// <param name="smooth"></param>
  24. void TransferSyn(GoodsInfo goods, bool smooth = true);
  25. /// <summary>
  26. /// 发送同步状态
  27. /// </summary>
  28. /// <param name="state"></param>
  29. /// <param name="status"></param>
  30. void SendTransfer(int state, int status);
  31. /// <summary>
  32. /// 获取组件的实例
  33. /// </summary>
  34. /// <returns></returns>
  35. GameObject GetInstace();
  36. void DestroyArt();
  37. }
  38. }