调整了模板
This commit is contained in:
@@ -7,6 +7,7 @@ namespace BITFactory;
|
||||
public partial class CourseElement : Node
|
||||
{
|
||||
private static Node CurrentScene;
|
||||
private static string CurrentScenePath=string.Empty;
|
||||
[Export]
|
||||
public PackedScene CourseScene;
|
||||
|
||||
@@ -41,7 +42,7 @@ public partial class CourseElement : Node
|
||||
|
||||
Stopwatch stopwatch = new();
|
||||
stopwatch.Start();
|
||||
if (CurrentScene?.Name == CourseScene?.ResourceName)
|
||||
if (CurrentScenePath == CourseScene?.ResourcePath)
|
||||
{
|
||||
BIT4Log.Log<CourseElement>($"已返回当前课程");
|
||||
UXService.Open(CurrentScene as Control);
|
||||
@@ -54,6 +55,7 @@ public partial class CourseElement : Node
|
||||
BIT4Log.Log<CourseElement>($"已释放当前课程:\t{CurrentScene.Name}");
|
||||
}
|
||||
CurrentScene = CourseScene!.Instantiate();
|
||||
CurrentScenePath = CourseScene.ResourcePath;
|
||||
GetTree().Root.AddChild(CurrentScene);
|
||||
UXService.Open(CurrentScene as Control);
|
||||
BIT4Log.Log<CourseElement>($"已加载新的课程:\t{CourseScene.ResourceName}");
|
||||
|
Reference in New Issue
Block a user