update: 更新到godot4.4.1,并大量重构代码

This commit is contained in:
ZZY
2025-06-09 18:17:06 +08:00
parent b27abb55a2
commit 3fa39fc71e
39 changed files with 801 additions and 790 deletions

View File

@ -0,0 +1,30 @@
using Godot;
using System;
public partial class Mods : Control {
GlobalManager global = GlobalManager.Instance;
public override void _Ready() {
// RunDemo();
// ModManager modManager = new();
// modManager.RegistryFunc("OnInit", () => { GD.Print("OnInit"); }, true);
// modManager.RegistryFunc("foo", () => { GD.Print("Hello"); });
// LuaMod mod = new(ProjectSettings.GlobalizePath("res://Protos/test.lua"));
// mod.BindFunc(modManager);
// try {
// modManager.InvokeFunc<Action>("OnInit");
// }
// catch (System.Exception e) {
// GD.PrintErr("OnInit error: ", e.Message, e.StackTrace);
// }
}
public void OnOpenModFileDir() {
OS.ShellOpen(global.ConfigManager.GetValue<string>("mods_fpath") ?? "user://Mods/");
}
public void OnBack() {
ArgumentNullException.ThrowIfNull(global);
global.GotoScene("res://Main.tscn");
}
}