InternalPackage.cs 883 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections.Generic;
  2. using Godot;
  3. using TBL.GodotSharp.Content.FileSystem;
  4. using Zio;
  5. namespace TBL.GodotSharp.Content.Package
  6. {
  7. /// <summary>
  8. /// 内部内容包
  9. /// </summary>
  10. internal class InternalPackage : PackageNode
  11. {
  12. public override IFileSystem SelfFileSystem { get; }
  13. public override Info SelfInfo { get; }
  14. public override IEnumerable<DependencyInfo> Dependencies { get; }
  15. public InternalPackage(Info info) : this(info, string.Empty)
  16. {
  17. }
  18. public InternalPackage(Info info, string root)
  19. {
  20. SelfFileSystem = new GodotFileSystem(root);
  21. SelfInfo = root.Empty()
  22. ? info
  23. : new Info($"{info.Name}.{root}", info.AuthorInfo, info.VersionInfo)
  24. ;
  25. Dependencies = null;
  26. }
  27. }
  28. }