update: 更新到godot4.4.1,并大量重构代码
This commit is contained in:
30
Scripts/Controllers/Mods.cs
Normal file
30
Scripts/Controllers/Mods.cs
Normal 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");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user