using System.Linq; using System.Threading.Tasks; using Godot; using Milimoe.FunGame.Core.Api.Utility; using Milimoe.FunGame.Core.Model; namespace Milimoe.GodotGame; public partial class NovelController : CanvasLayer, ISaveSelectionEvent { public string NovelName { get; set; } = ""; public string SceneName { get; set; } = ""; public NovelConfig NovelConfig { get; set; } = null; public NovelNode Current { get; set; } = null; public INovelEndEvent ChapterObject { get; set; } = null; public IMenuObject MenuObject { get; set; } = null; public IFadeInFadeOutBlack FadeObject { get; set; } = null; public bool Automatic { get; set; } = false; [Export] public SavedSelection SavedSelection; [Signal] public delegate void CloseSavedSelectionEventHandler(bool selected, int index); private TextureRect _portrait1; private TextureRect _portrait2left; private TextureRect _portrait2right; private TextureRect _image1; private TextureRect _image2left; private TextureRect _image2right; private Panel _panel; private Panel _namePanel; private Label _name; private RichTextLabel _content; private AnimatedRichTextLabel _content_richLabel; private VBoxContainer _vBoxContainer; private ColorRect _colorRect; private Button _autoPlay; private Button _load; private Button _save; private Button _menu; public override void _Ready() { Visible = false; _portrait1 = GetNode("立绘1"); _portrait2left = GetNode("立绘2左"); _portrait2right = GetNode("立绘2右"); _image1 = _portrait1.GetNode("Image"); _image2left = _portrait2left.GetNode("Image"); _image2right = _portrait2right.GetNode("Image"); _panel = GetNode("Panel"); _namePanel = _panel.GetNode("NamePanel"); _name = _namePanel.GetNode