调整 Event 和 Editor 命名空间

- 将原来的 CustomEvent 调整到 SepCore.Event
- 将 Editor 文件夹下的统一到 SepCore.Editor,顺带修改了 Editor 程序集
This commit is contained in:
SepComet 2026-06-02 19:26:21 +08:00
parent 34c0784190
commit affa44e4d0
49 changed files with 99 additions and 109 deletions

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using Components; using Components;
using CustomEvent; using SepCore.Event;
using SepCore.DataTable; using SepCore.DataTable;
using SepCore.Definition; using SepCore.Definition;
using Entity.EntityData; using Entity.EntityData;

View File

@ -2,7 +2,7 @@ using GameFramework;
using GameFramework.Event; using GameFramework.Event;
using UnityEngine; using UnityEngine;
namespace CustomEvent namespace SepCore.Event
{ {
public sealed class ProjectileHitPresentationEventArgs : GameEventArgs public sealed class ProjectileHitPresentationEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class DisplayItemInfoHideEventArgs : GameEventArgs public class DisplayItemInfoHideEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class DisplayItemInfoLockEventArgs : GameEventArgs public class DisplayItemInfoLockEventArgs : GameEventArgs
{ {

View File

@ -2,7 +2,7 @@ using GameFramework;
using GameFramework.Event; using GameFramework.Event;
using UnityEngine; using UnityEngine;
namespace CustomEvent namespace SepCore.Event
{ {
public class DisplayItemShowEventArgs : GameEventArgs public class DisplayItemShowEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class LevelProcessEventArgs : GameEventArgs public class LevelProcessEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class LevelUpPropSelectedEventArgs : GameEventArgs public class LevelUpPropSelectedEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuAboutButtonClickEventArgs : GameEventArgs public class MenuAboutButtonClickEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuFileButtonClickEventArgs : GameEventArgs public class MenuFileButtonClickEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuGuideButtonClickEventArgs : GameEventArgs public class MenuGuideButtonClickEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuQuitButtonClickEventArgs : GameEventArgs public class MenuQuitButtonClickEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuSelectRoleConfirmEventArgs : GameEventArgs public class MenuSelectRoleConfirmEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuSelectRoleReturnEventArgs : GameEventArgs public class MenuSelectRoleReturnEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuSelectRoleSelectedEventArgs : GameEventArgs public class MenuSelectRoleSelectedEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuSettingButtonClickEventArgs : GameEventArgs public class MenuSettingButtonClickEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class MenuStartGameEventArgs : GameEventArgs public class MenuStartGameEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class PlayerCoinChangeEventArgs : GameEventArgs public class PlayerCoinChangeEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class PlayerExpChangeEventArgs : GameEventArgs public class PlayerExpChangeEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class PlayerHealthChangeEventArgs : GameEventArgs public class PlayerHealthChangeEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class PlayerLevelUpEventArgs : GameEventArgs public class PlayerLevelUpEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class RefreshEventArgs : GameEventArgs public class RefreshEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class ShopContinueEventArgs : GameEventArgs public class ShopContinueEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class ShopPurchaseEventArgs : GameEventArgs public class ShopPurchaseEventArgs : GameEventArgs
{ {

View File

@ -1,7 +1,7 @@
using GameFramework; using GameFramework;
using GameFramework.Event; using GameFramework.Event;
namespace CustomEvent namespace SepCore.Event
{ {
public class ShopWeaponRecycleEventArgs : GameEventArgs public class ShopWeaponRecycleEventArgs : GameEventArgs
{ {

View File

@ -1,17 +1,10 @@
//------------------------------------------------------------ using SepCore.Definition;
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using SepCore.Definition;
using GameFramework.Debugger; using GameFramework.Debugger;
using GameFramework.Localization; using GameFramework.Localization;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace StarForce namespace SepCore.Editor
{ {
public class ChangeLanguageDebuggerWindow : IDebuggerWindow public class ChangeLanguageDebuggerWindow : IDebuggerWindow
{ {

View File

@ -1,17 +1,10 @@
//------------------------------------------------------------ using GameFramework;
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using GameFramework;
using System.IO; using System.IO;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Editor; using UnityGameFramework.Editor;
using UnityGameFramework.Editor.ResourceTools; using UnityGameFramework.Editor.ResourceTools;
namespace StarForce.Editor namespace SepCore.Editor
{ {
public static class GameFrameworkConfigs public static class GameFrameworkConfigs
{ {

View File

@ -1,4 +1,3 @@
#if UNITY_EDITOR
using System; using System;
using System.Linq; using System.Linq;
using CustomComponent; using CustomComponent;
@ -10,7 +9,7 @@ using Procedure;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace StarForce.Editor namespace SepCore.Editor
{ {
public class PlayerBuffConsoleWindow : EditorWindow public class PlayerBuffConsoleWindow : EditorWindow
{ {
@ -27,7 +26,7 @@ namespace StarForce.Editor
private float _spawnRateScaleInput = 1f; private float _spawnRateScaleInput = 1f;
private float _extendDurationSeconds = 30f; private float _extendDurationSeconds = 30f;
[MenuItem("StarForce/Debug/Player Buff Console")] [MenuItem("SepCore/Debug/Player Buff Console")]
private static void Open() private static void Open()
{ {
GetWindow<PlayerBuffConsoleWindow>(WindowTitle); GetWindow<PlayerBuffConsoleWindow>(WindowTitle);
@ -291,4 +290,3 @@ namespace StarForce.Editor
} }
} }
} }
#endif

View File

@ -3,50 +3,56 @@ using UnityEditor.SceneManagement;
using UnityEngine; using UnityEngine;
using System.IO; using System.IO;
[InitializeOnLoad] namespace SepCore.Editor
public class SceneSwitchLeft
{ {
static SceneSwitchLeft() [InitializeOnLoad]
public class SceneSwitchLeft
{ {
// 注册到全局工具栏绘制事件 static SceneSwitchLeft()
SceneView.duringSceneGui += OnSceneGUI;
}
static void OnSceneGUI(SceneView sceneView)
{
// 在 Scene 视图的左上角绘制一个下拉菜单
Handles.BeginGUI();
GUILayout.BeginArea(new Rect(10, 10, 200, 100));
if (EditorGUILayout.DropdownButton(new GUIContent("快速切换场景"), FocusType.Passive, EditorStyles.toolbarDropDown))
{ {
ShowSceneMenu(); // 注册到全局工具栏绘制事件
SceneView.duringSceneGui += OnSceneGUI;
} }
GUILayout.EndArea();
Handles.EndGUI(); static void OnSceneGUI(SceneView sceneView)
}
static void ShowSceneMenu()
{
GenericMenu menu = new GenericMenu();
// 查找项目中所有启用Enabled的场景
string[] sceneGuids = AssetDatabase.FindAssets("t:Scene");
foreach (string guid in sceneGuids)
{ {
string path = AssetDatabase.GUIDToAssetPath(guid); // 在 Scene 视图的左上角绘制一个下拉菜单
string name = Path.GetFileNameWithoutExtension(path); Handles.BeginGUI();
menu.AddItem(new GUIContent(name), false, () => { GUILayout.BeginArea(new Rect(10, 10, 200, 100));
if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) if (EditorGUILayout.DropdownButton(new GUIContent("快速切换场景"), FocusType.Passive,
EditorStyles.toolbarDropDown))
{
ShowSceneMenu();
}
GUILayout.EndArea();
Handles.EndGUI();
}
static void ShowSceneMenu()
{
GenericMenu menu = new GenericMenu();
// 查找项目中所有启用Enabled的场景
string[] sceneGuids = AssetDatabase.FindAssets("t:Scene");
foreach (string guid in sceneGuids)
{
string path = AssetDatabase.GUIDToAssetPath(guid);
string name = Path.GetFileNameWithoutExtension(path);
menu.AddItem(new GUIContent(name), false, () =>
{ {
EditorSceneManager.OpenScene(path); if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
} {
}); EditorSceneManager.OpenScene(path);
} }
});
}
menu.ShowAsContext(); menu.ShowAsContext();
}
} }
} }

View File

@ -1,10 +1,10 @@
{ {
"name": "VampireLike.Editor", "name": "SepCore.Editor",
"rootNamespace": "", "rootNamespace": "SepCore.Editor",
"references": [ "references": [
"VampireLike", "GUID:47a82ffa13c291447ab895cd0bc251cd",
"UnityGameFramework.Runtime", "GUID:363c5eb08ff8e6a439b85e37b8c20d96",
"UnityGameFramework.Editor" "GUID:a2d8a19598eca814496b089021d08d60"
], ],
"includePlatforms": [ "includePlatforms": [
"Editor" "Editor"
@ -17,4 +17,4 @@
"defineConstraints": [], "defineConstraints": [],
"versionDefines": [], "versionDefines": [],
"noEngineReferences": false "noEngineReferences": false
} }

View File

@ -4,9 +4,9 @@ using UnityEditor;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Editor.ResourceTools; using UnityGameFramework.Editor.ResourceTools;
namespace VampireLike.Editor namespace SepCore.Editor
{ {
public sealed class VampireLikeBuildEventHandler : IBuildEventHandler public sealed class DefaultBuildEventHandler : IBuildEventHandler
{ {
public bool ContinueOnFailure public bool ContinueOnFailure
{ {

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using SepCore.Definition; using SepCore.Definition;
using GameFramework.Event; using GameFramework.Event;
using UnityEngine; using UnityEngine;

View File

@ -1,5 +1,5 @@
using CustomComponent; using CustomComponent;
using CustomEvent; using SepCore.Event;
using GameFramework.Event; using GameFramework.Event;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;

View File

@ -1,5 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using CustomEvent; using SepCore.Event;
using SepCore.Definition; using SepCore.Definition;
using CustomUtility; using CustomUtility;
using GameFramework.Event; using GameFramework.Event;

View File

@ -1,5 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using CustomEvent; using SepCore.Event;
using GameFramework.Event; using GameFramework.Event;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;

View File

@ -1,5 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using CustomEvent; using SepCore.Event;
using SepCore.Definition; using SepCore.Definition;
using CustomUtility; using CustomUtility;
using Entity.Weapon; using Entity.Weapon;

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;

View File

@ -1,5 +1,5 @@
using System; using System;
using CustomEvent; using SepCore.Event;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using SepCore.Definition; using SepCore.Definition;
using GameFramework.Event; using GameFramework.Event;
using UnityEngine; using UnityEngine;

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace UI namespace UI

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using SepCore.Definition; using SepCore.Definition;
using GameFramework.Event; using GameFramework.Event;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;

View File

@ -1,6 +1,6 @@
using System; using System;
using CustomComponent; using CustomComponent;
using CustomEvent; using SepCore.Event;
using SepCore.DataTable; using SepCore.DataTable;
using Entity; using Entity;
using GameFramework.Fsm; using GameFramework.Fsm;

View File

@ -1,5 +1,5 @@
using System; using System;
using CustomEvent; using SepCore.Event;
using SepCore.Definition; using SepCore.Definition;
using UnityEngine; using UnityEngine;

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Linq; using System.Linq;
using Components; using Components;
using CustomEvent; using SepCore.Event;
using SepCore.DataTable; using SepCore.DataTable;
using SepCore.Definition; using SepCore.Definition;
using Entity; using Entity;

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using SepCore.Definition; using SepCore.Definition;
using Entity; using Entity;
using Entity.Weapon; using Entity.Weapon;

View File

@ -1,4 +1,4 @@
using CustomEvent; using SepCore.Event;
using Entity; using Entity;
using Entity.EntityData; using Entity.EntityData;
using Entity.Weapon; using Entity.Weapon;