This commit is contained in:
Rendo 2025-07-05 20:51:04 +05:00
commit 0e9e17cfdc
20 changed files with 267 additions and 1 deletions

View file

@ -0,0 +1,44 @@
#if TOOLS
using Godot;
[Tool]
public partial class PvZAdventure : EditorPlugin
{
private PackedScene panel = ResourceLoader.Load<PackedScene>("res://addons/pvzadventure/scenes/adventure_editor.tscn");
private Control panelInstance;
public override void _EnterTree()
{
panelInstance = panel.Instantiate<Control>();
EditorInterface.Singleton.GetEditorMainScreen().AddChild(panelInstance);
_MakeVisible(false);
}
public override void _ExitTree()
{
if (panelInstance != null)
{
panelInstance.QueueFree();
}
}
public override bool _HasMainScreen()
{
return true;
}
public override void _MakeVisible(bool visible)
{
if (panelInstance != null)
{
panelInstance.Visible = visible;
}
}
public override string _GetPluginName()
{
return "Adventure";
}
}
#endif