using System.Collections.Generic; using Godot; namespace TBL.GodotSharp.Content; /// /// 资源包节点 /// public abstract partial class PackageNode : Node { /// /// 自身信息 /// public abstract Info SelfInfo { get; } /// /// 依赖项信息集 /// public abstract ICollection Dependencies { get; } public override void _Ready() { Name = SelfInfo.ToString(); } public override void _EnterTree() { if (SelfFileSystem != null) { Content.FileSystem.AddFileSystem(SelfFileSystem); } } public override void _ExitTree() { if (SelfFileSystem != null) { Content.FileSystem.RemoveFileSystem(SelfFileSystem); SelfFileSystem.Dispose(); } } }