Breakpoint

This commit is contained in:
CortexCore
2023-07-04 04:08:18 +08:00
parent 4af38a021c
commit d12e53739d
24 changed files with 1411 additions and 342 deletions

View File

@@ -1,5 +1,4 @@
using Godot;
using System;
using BITKit;
namespace BITFactory;
@@ -37,13 +36,20 @@ public partial class CourseElement : Node
{
return;
}
if (CurrentScene?.Name == CourseScene?.ResourceName)
{
BIT4Log.Log<CourseElement>($"已返回当前课程");
UXService.Open(CurrentScene as Control);
return;
}
if (CurrentScene is not null)
{
BIT4Log.Log<CourseElement>($"正在释放课程:\t{CurrentScene.Name}");
CurrentScene.QueueFree();
BIT4Log.Log<CourseElement>($"已释放当前课程:\t{CurrentScene.Name}");
}
CurrentScene = CourseScene.Instantiate();
CurrentScene = CourseScene!.Instantiate();
GetTree().Root.AddChild(CurrentScene);
UXService.Open(CurrentScene as Control);
BIT4Log.Log<CourseElement>($"已加载新的课程:\t{CurrentScene.Name}");