调整 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 Components;
using CustomEvent;
using SepCore.Event;
using SepCore.DataTable;
using SepCore.Definition;
using Entity.EntityData;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,50 +3,56 @@ using UnityEditor.SceneManagement;
using UnityEngine;
using System.IO;
[InitializeOnLoad]
public class SceneSwitchLeft
namespace SepCore.Editor
{
static SceneSwitchLeft()
[InitializeOnLoad]
public class 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))
static SceneSwitchLeft()
{
ShowSceneMenu();
// 注册到全局工具栏绘制事件
SceneView.duringSceneGui += OnSceneGUI;
}
GUILayout.EndArea();
Handles.EndGUI();
}
static void ShowSceneMenu()
{
GenericMenu menu = new GenericMenu();
// 查找项目中所有启用Enabled的场景
string[] sceneGuids = AssetDatabase.FindAssets("t:Scene");
foreach (string guid in sceneGuids)
static void OnSceneGUI(SceneView sceneView)
{
string path = AssetDatabase.GUIDToAssetPath(guid);
string name = Path.GetFileNameWithoutExtension(path);
// 在 Scene 视图的左上角绘制一个下拉菜单
Handles.BeginGUI();
menu.AddItem(new GUIContent(name), false, () => {
if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
GUILayout.BeginArea(new Rect(10, 10, 200, 100));
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",
"rootNamespace": "",
"name": "SepCore.Editor",
"rootNamespace": "SepCore.Editor",
"references": [
"VampireLike",
"UnityGameFramework.Runtime",
"UnityGameFramework.Editor"
"GUID:47a82ffa13c291447ab895cd0bc251cd",
"GUID:363c5eb08ff8e6a439b85e37b8c20d96",
"GUID:a2d8a19598eca814496b089021d08d60"
],
"includePlatforms": [
"Editor"
@ -17,4 +17,4 @@
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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