diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs index b7a8ba6..af4f4ec 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/Plugin.cs @@ -60,7 +60,7 @@ { Instance = this; - if (_uiMonitor != null && Instance == this) + if (_uiMonitor != null) { _uiMonitor.Process((float) delta); } @@ -68,7 +68,7 @@ { _uiMonitor = new NodeMonitor(); _uiMonitor.SceneNodeChangeEvent += GenerateUiCode; - OnSceneChanged(GetEditorInterface().GetEditedSceneRoot()); + OnSceneChanged(EditorInterface.Singleton.GetEditedSceneRoot()); } } @@ -97,7 +97,7 @@ } _editorTools = GD.Load(ResourcePath.prefab_ui_EditorTools_tscn).Instantiate(); - var editorMainScreen = GetEditorInterface().GetEditorMainScreen(); + var editorMainScreen = EditorInterface.Singleton.GetEditorMainScreen(); editorMainScreen.AddChild(_editorTools); try @@ -128,7 +128,7 @@ _uiMonitor = new NodeMonitor(); _uiMonitor.SceneNodeChangeEvent += GenerateUiCode; - OnSceneChanged(GetEditorInterface().GetEditedSceneRoot()); + OnSceneChanged(EditorInterface.Singleton.GetEditedSceneRoot()); } public void OnBeforeSerialize() diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/UiGenerator.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/UiGenerator.cs index d4c0da8..eb4a48d 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/UiGenerator.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/UiGenerator.cs @@ -80,7 +80,7 @@ //打开ui if (open) { - Plugin.Plugin.Instance.GetEditorInterface().OpenSceneFromPath(prefabResPath); + EditorInterface.Singleton.OpenSceneFromPath(prefabResPath); } } diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs index cace31a..587de4e 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_EditorTool.cs @@ -73,7 +73,7 @@ { owner = parent.Owner; } - else if (Plugin.Plugin.Instance.GetEditorInterface().GetEditedSceneRoot() == this) + else if (EditorInterface.Singleton.GetEditedSceneRoot() == this) { owner = this; } diff --git a/DungeonShooting_Godot/src/framework/map/serialize/room/DungeonRoomGroup.cs b/DungeonShooting_Godot/src/framework/map/serialize/room/DungeonRoomGroup.cs index e48086f..b6d55f2 100644 --- a/DungeonShooting_Godot/src/framework/map/serialize/room/DungeonRoomGroup.cs +++ b/DungeonShooting_Godot/src/framework/map/serialize/room/DungeonRoomGroup.cs @@ -71,7 +71,6 @@ private bool _init = false; private Dictionary _weightRandomMap; - private List _readyBattleList; /// /// 获取所有房间数据 diff --git a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs index e46541d..73fd0e8 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTools/EditorToolsPanel.cs @@ -210,7 +210,7 @@ { if (Plugin.Plugin.Instance != null) { - var root = Plugin.Plugin.Instance.GetEditorInterface().GetEditedSceneRoot(); + var root = EditorInterface.Singleton.GetEditedSceneRoot(); if (root != null && Plugin.Plugin.Instance.CheckIsUi(root)) { if (UiGenerator.GenerateUiCodeFromEditor(root))