Compare commits

..

2 Commits

Author SHA1 Message Date
SepComet edd7088804 规范命名空间
具体来说就是 SepCore 开头,然后接所属的模块名,比如 SepCore.Entity,SepCore.Simulation,SepCore.Procedure
2026-06-03 16:57:40 +08:00
SepComet 5de3fdc795 迁移 EntityData 到 Base 中
- 新增 EntityDataFactory 工厂类,提供创建 EntityData 的统一入口
- 移出 EntityData 及派生类对 GameEntry 的依赖并移入 SepCore.Base 程序集中
2026-06-03 15:12:55 +08:00
238 changed files with 720 additions and 837 deletions

View File

@ -13,7 +13,6 @@ using UnityEngine.Networking;
#else
using UnityEngine.Experimental.Networking;
#endif
using Utility = GameFramework.Utility;
namespace UnityGameFramework.Runtime
{

View File

@ -14,7 +14,6 @@ using UnityEngine;
using UnityEngine.Networking;
#endif
using UnityEngine.SceneManagement;
using Utility = GameFramework.Utility;
namespace UnityGameFramework.Runtime
{

View File

@ -13,7 +13,6 @@ using UnityEngine.Networking;
#else
using UnityEngine.Experimental.Networking;
#endif
using Utility = GameFramework.Utility;
namespace UnityGameFramework.Runtime
{

View File

@ -1,14 +1,15 @@
#if UNITY_EDITOR || DEVELOPMENT_BUILD
using System;
using System.Linq;
using Components;
using CustomComponent;
using SepCore.Event;
using SepCore.DataTable;
using SepCore.Definition;
using Entity;
using CustomUtility;
using Procedure;
using SepCore.Entity;
using SepCore.Components;
using SepCore.CustomUtility;
using SepCore.Simulation;
using SepCore.EnemyManager;
using SepCore.Procedure;
using UnityEngine;
using UnityGameFramework.Runtime;
#if ENABLE_INPUT_SYSTEM
@ -209,7 +210,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
GUILayout.Label($"Enemy Count: {enemyManager.CurrentEnemyCount}");
}
Simulation.SimulationWorld simulationWorld = GameEntry.SimulationWorld;
SimulationWorld simulationWorld = GameEntry.SimulationWorld;
if (_showCollisionStats && simulationWorld != null)
{
GUILayout.Space(4f);

View File

@ -1,5 +1,5 @@
using SepCore.Definition;
using CustomUtility;
using SepCore.CustomUtility;
using UnityGameFramework.Runtime;
namespace SepCore.DataTable

View File

@ -1,5 +1,5 @@
using System;
using CustomUtility;
using SepCore.CustomUtility;
using SepCore.Definition;
using UnityGameFramework.Runtime;

View File

@ -1,6 +1,6 @@
using SepCore.Definition;
using Newtonsoft.Json;
using CustomUtility;
using SepCore.CustomUtility;
using UnityGameFramework.Runtime;
namespace SepCore.DataTable

View File

@ -1,6 +1,6 @@
using SepCore.Definition;
using Newtonsoft.Json;
using CustomUtility;
using SepCore.CustomUtility;
using UnityGameFramework.Runtime;
namespace SepCore.DataTable

View File

@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using SepCore.Definition;
using GameFramework;
using StarForce;
using SepCore.Definition;
using UnityGameFramework.Runtime;
namespace SepCore.DataTable
@ -135,4 +132,4 @@ namespace SepCore.DataTable
ExpRequires = expRequires.ToArray();
}
}
}
}

View File

@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using SepCore.Definition;
using GameFramework;
using CustomUtility;
using SepCore.Definition;
using SepCore.CustomUtility;
using Newtonsoft.Json.Linq;
using UnityGameFramework.Runtime;
@ -21,7 +21,7 @@ namespace SepCore.DataTable
public override int Id => m_Id;
public int EntityTypeId { get; private set; }
/// <summary>
/// 获取武器名称。
/// </summary>
@ -36,12 +36,12 @@ namespace SepCore.DataTable
/// 获取武器稀有度
/// </summary>
public ItemRarity Rarity { get; private set; }
/// <summary>
/// 获取武器价值
/// </summary>
public int Price { get; private set; }
/// <summary>
/// 获取武器价值浮动率
/// </summary>
@ -112,7 +112,7 @@ namespace SepCore.DataTable
private void GeneratePropertyArray()
{
}
/// <summary>
/// 解参数
/// </summary>

View File

@ -1,6 +1,3 @@
using Components;
using Entity;
using Entity.EntityData;
using SepCore.DataTable;
namespace SepCore.Definition
@ -12,7 +9,7 @@ namespace SepCore.Definition
public string IconAssetName { get; private set; }
public ItemRarity Rarity { get; private set; }
public StatModifier[] Modifiers => _modifiers;
public PropItem(DRProp prop)
{
if (prop == null) return;
@ -35,23 +32,5 @@ namespace SepCore.Definition
Rarity = rarity;
IconAssetName = iconAssetName;
}
public void OnAttach(StatComponent statComponent)
{
if (_modifiers == null || statComponent == null) return;
foreach (var modifier in _modifiers)
{
statComponent.AddModifier(modifier);
}
}
public void OnDetach(StatComponent statComponent)
{
if (_modifiers == null || statComponent == null) return;
foreach (var modifier in _modifiers)
{
statComponent.RemoveModifier(modifier);
}
}
}
}

View File

@ -1,6 +1,6 @@
using System;
using SepCore.Definition;
using CustomUtility;
using SepCore.CustomUtility;
using UnityGameFramework.Runtime;
namespace SepCore.Definition

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cedb6e3c4b92edf4bbbe5fb34bb043ba
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,31 @@
using System;
using SepCore.Definition;
using UnityEngine;
namespace SepCore.Entity
{
[Serializable]
public abstract class AccessoryObjectData : EntityDataBase
{
[SerializeField] private int _ownerId = 0;
[SerializeField] private CampType _ownerCamp = CampType.Unknown;
public AccessoryObjectData(int entityId, int typeId, int ownerId, CampType ownerCamp)
: base(entityId, typeId)
{
_ownerId = ownerId;
_ownerCamp = ownerCamp;
}
/// <summary>
/// 拥有者编号。
/// </summary>
public int OwnerId => _ownerId;
/// <summary>
/// 拥有者阵营。
/// </summary>
public CampType OwnerCamp => _ownerCamp;
}
}

View File

@ -1,4 +1,4 @@
namespace Entity.EntityData
namespace SepCore.Entity
{
public class CoinData : EntityDataBase
{

View File

@ -0,0 +1,20 @@
using System;
using UnityEngine;
namespace SepCore.Entity
{
[Serializable]
public class EffectData : EntityDataBase
{
[SerializeField]
private float _keepTime = 0f;
public EffectData(int entityId, int typeId)
: base(entityId, typeId)
{
_keepTime = 3f;
}
public float KeepTime => _keepTime;
}
}

View File

@ -3,31 +3,20 @@ using System.Collections.Generic;
using SepCore.DataTable;
using SepCore.Definition;
using UnityEngine;
using UnityGameFramework.Runtime;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public class EnemyData : TargetableObjectData
{
[SerializeField] private DREnemy _drEnemy;
private DREnemy _drEnemy;
public EnemyData(int entityId, EnemyType enemyType, int level) : base(
entityId, (int)enemyType, CampType.Enemy)
public EnemyData(int entityId, DREnemy drEnemy, int level) : base(
entityId, drEnemy.Id, CampType.Enemy)
{
DREnemy enemyRow = GameEntry.DataTable.GetDataTableRow<DREnemy>((int)enemyType);
if (enemyRow == null)
{
throw new Exception($"Enemy data table row is missing, EnemyType='{enemyType}'.");
}
else
{
_drEnemy = enemyRow;
}
_drEnemy = drEnemy;
int effectiveLevel = Mathf.Max(1, level);
MaxHealthBase = enemyRow.MaxHealth + enemyRow.HpAddPerLevel * (effectiveLevel - 1);
MaxHealthBase = _drEnemy.MaxHealth + _drEnemy.HpAddPerLevel * (effectiveLevel - 1);
}
public EnemyType EnemyType => (EnemyType)_drEnemy.Id;

View File

@ -2,7 +2,7 @@ using System;
using SepCore.Definition;
using UnityEngine;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public class EnemyProjectileData : EntityDataBase

View File

@ -0,0 +1,51 @@
using System;
using UnityEngine;
namespace SepCore.Entity
{
[Serializable]
public abstract class EntityDataBase
{
[SerializeField] private int _id = 0;
[SerializeField] private int _typeId = 0;
[SerializeField] private Vector3 _position = Vector3.zero;
[SerializeField] private Quaternion _rotation = Quaternion.identity;
public EntityDataBase(int entityId, int typeId)
{
_id = entityId;
_typeId = typeId;
}
/// <summary>
/// 实体编号。
/// </summary>
public int Id => _id;
/// <summary>
/// 实体类型编号。
/// </summary>
public int TypeId => _typeId;
/// <summary>
/// 实体位置。
/// </summary>
public Vector3 Position
{
get => _position;
set => _position = value;
}
/// <summary>
/// 实体朝向。
/// </summary>
public Quaternion Rotation
{
get => _rotation;
set => _rotation = value;
}
}
}

View File

@ -1,4 +1,4 @@
namespace Entity.EntityData
namespace SepCore.Entity
{
public class ExpData : EntityDataBase
{

View File

@ -1,8 +1,7 @@
using System;
using SepCore.DataTable;
using SepCore.Definition;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public class PlayerData : TargetableObjectData
@ -16,4 +15,4 @@ namespace Entity.EntityData
public override int MaxHealthBase { get; }
}
}
}

View File

@ -0,0 +1,27 @@
using System;
using SepCore.Definition;
namespace SepCore.Entity
{
[Serializable]
public abstract class TargetableObjectData : EntityDataBase
{
private CampType _camp;
public TargetableObjectData(int entityId, int typeId, CampType camp)
: base(entityId, typeId)
{
_camp = camp;
}
/// <summary>
/// 角色阵营。
/// </summary>
public CampType Camp => _camp;
/// <summary>
/// 最大生命。
/// </summary>
public abstract int MaxHealthBase { get; }
}
}

View File

@ -4,7 +4,7 @@ using SepCore.DataTable;
using SepCore.Definition;
using GameFramework;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public class WeaponData : AccessoryObjectData
@ -13,17 +13,11 @@ namespace Entity.EntityData
private int _entityTypeId = 0;
public WeaponData(int entityId, WeaponType weaponType, int ownerId, CampType ownerCamp)
: base(entityId, (int)weaponType, ownerId, ownerCamp)
public WeaponData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
: base(entityId, drWeapon.Id, ownerId, ownerCamp)
{
_drWeapon = GameEntry.DataTable.GetDataTableRow<DRWeapon>((int)weaponType);
if (_drWeapon == null)
{
throw new Exception($"Weapon data table row is missing, WeaponType='{weaponType}'.");
}
_entityTypeId = _drWeapon.EntityTypeId;
_drWeapon = drWeapon;
_entityTypeId = drWeapon.EntityTypeId;
}
public WeaponType WeaponType => (WeaponType)_drWeapon.Id;

View File

@ -1,7 +1,8 @@
using System;
using SepCore.DataTable;
using SepCore.Definition;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public sealed class WeaponHandgunParamsData
@ -12,8 +13,8 @@ namespace Entity.EntityData
{
public WeaponHandgunParamsData ParamsData { get; }
public WeaponHandgunData(int entityId, int ownerId, CampType ownerCamp)
: base(entityId, WeaponType.WeaponHandgun, ownerId, ownerCamp)
public WeaponHandgunData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
: base(entityId, drWeapon, ownerId, ownerCamp)
{
ParamsData = ParseParams<WeaponHandgunParamsData>();
}

View File

@ -1,7 +1,8 @@
using System;
using SepCore.DataTable;
using SepCore.Definition;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public sealed class WeaponKnifeParamsData
@ -13,8 +14,8 @@ namespace Entity.EntityData
{
public WeaponKnifeParamsData ParamsData { get; }
public WeaponKnifeData(int entityId, int ownerId, CampType ownerCamp) : base(entityId, WeaponType.WeaponKnife,
ownerId, ownerCamp)
public WeaponKnifeData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
: base(entityId, drWeapon, ownerId, ownerCamp)
{
ParamsData = ParseParams<WeaponKnifeParamsData>();
}

View File

@ -1,7 +1,8 @@
using System;
using SepCore.DataTable;
using SepCore.Definition;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public sealed class WeaponLanceParamsData
@ -62,8 +63,8 @@ namespace Entity.EntityData
{
public WeaponLanceParamsData ParamsData { get; }
public WeaponLanceData(int entityId, int ownerId, CampType ownerCamp)
: base(entityId, WeaponType.WeaponLance, ownerId, ownerCamp)
public WeaponLanceData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
: base(entityId, drWeapon, ownerId, ownerCamp)
{
ParamsData = ParseParams<WeaponLanceParamsData>();
}

View File

@ -1,7 +1,8 @@
using System;
using SepCore.DataTable;
using SepCore.Definition;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public sealed class WeaponLightningParamsData
@ -14,8 +15,8 @@ namespace Entity.EntityData
{
public WeaponLightningParamsData ParamsData { get; }
public WeaponLightningData(int entityId, int ownerId, CampType ownerCamp)
: base(entityId, WeaponType.WeaponLightning, ownerId, ownerCamp)
public WeaponLightningData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
: base(entityId, drWeapon, ownerId, ownerCamp)
{
ParamsData = ParseParams<WeaponLightningParamsData>();
}

View File

@ -1,7 +1,8 @@
using System;
using SepCore.DataTable;
using SepCore.Definition;
namespace Entity.EntityData
namespace SepCore.Entity
{
[Serializable]
public sealed class WeaponSlashParamsData
@ -13,8 +14,8 @@ namespace Entity.EntityData
{
public WeaponSlashParamsData ParamsData { get; }
public WeaponSlashData(int entityId, int ownerId, CampType ownerCamp)
: base(entityId, WeaponType.WeaponSlash, ownerId, ownerCamp)
public WeaponSlashData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
: base(entityId, drWeapon, ownerId, ownerCamp)
{
ParamsData = ParseParams<WeaponSlashParamsData>();
}

View File

@ -1,62 +1,62 @@
using Text = GameFramework.Utility.Text;
using GameFramework;
namespace CustomUtility
namespace SepCore.CustomUtility
{
public static class AssetUtility
{
public static string GetConfigAsset(string assetName, bool fromBytes)
{
return Text.Format("Assets/GameMain/Configs/{0}.{1}", assetName, fromBytes ? "bytes" : "txt");
return Utility.Text.Format("Assets/GameMain/Configs/{0}.{1}", assetName, fromBytes ? "bytes" : "txt");
}
public static string GetDataTableAsset(string assetName, bool fromBytes)
{
return Text.Format("Assets/GameMain/DataTables/{0}.{1}", assetName, fromBytes ? "bytes" : "txt");
return Utility.Text.Format("Assets/GameMain/DataTables/{0}.{1}", assetName, fromBytes ? "bytes" : "txt");
}
public static string GetFontAsset(string assetName)
{
return Text.Format("Assets/GameMain/Fonts/{0}.ttf", assetName);
return Utility.Text.Format("Assets/GameMain/Fonts/{0}.ttf", assetName);
}
public static string GetTMPFontAsset(string assetName)
{
return Text.Format("Assets/GameMain/Fonts/{0}.asset", assetName);
return Utility.Text.Format("Assets/GameMain/Fonts/{0}.asset", assetName);
}
public static string GetSceneAsset(string assetName)
{
return Text.Format("Assets/GameMain/Scenes/{0}.unity", assetName);
return Utility.Text.Format("Assets/GameMain/Scenes/{0}.unity", assetName);
}
public static string GetMusicAsset(string assetName)
{
return Text.Format("Assets/GameMain/Music/{0}.mp3", assetName);
return Utility.Text.Format("Assets/GameMain/Music/{0}.mp3", assetName);
}
public static string GetSoundAsset(string assetName)
{
return Text.Format("Assets/GameMain/Sounds/{0}.wav", assetName);
return Utility.Text.Format("Assets/GameMain/Sounds/{0}.wav", assetName);
}
public static string GetEntityAsset(string assetName)
{
return Text.Format("Assets/GameMain/Entities/{0}.prefab", assetName);
return Utility.Text.Format("Assets/GameMain/Entities/{0}.prefab", assetName);
}
public static string GetUIFormAsset(string assetName)
{
return Text.Format("Assets/GameMain/UI/UIForms/{0}.prefab", assetName);
return Utility.Text.Format("Assets/GameMain/UI/UIForms/{0}.prefab", assetName);
}
public static string GetUISoundAsset(string assetName)
{
return Text.Format("Assets/GameMain/UI/UISounds/{0}.wav", assetName);
return Utility.Text.Format("Assets/GameMain/UI/UISounds/{0}.wav", assetName);
}
public static string GetUITextureIconAsset(string assetName)
{
return Text.Format("Assets/GameMain/UI/UISprites/Icons/{0}.png", assetName);
return Utility.Text.Format("Assets/GameMain/UI/UISprites/Icons/{0}.png", assetName);
}
}
}

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using UnityGameFramework.Runtime;
namespace CustomUtility
namespace SepCore.CustomUtility
{
public static class EnumUtility<T> where T : struct, System.Enum
{

View File

@ -1,7 +1,7 @@
using System;
using Newtonsoft.Json;
namespace CustomUtility
namespace SepCore.CustomUtility
{
/// <summary>
/// Newtonsoft.Json 函数集辅助器。

View File

@ -3,7 +3,7 @@ using SepCore.Definition;
using GameFramework.DataTable;
using UnityEngine;
namespace CustomUtility
namespace SepCore.CustomUtility
{
public static class RarityUtility
{

View File

@ -7,7 +7,7 @@
using System;
namespace StarForce
namespace SepCore.CustomUtility
{
public static class WebUtility
{

View File

@ -1,5 +1,5 @@
using GameFramework;
using System.IO;
using System.IO;
using GameFramework;
using UnityEngine;
using UnityGameFramework.Editor;
using UnityGameFramework.Editor.ResourceTools;
@ -8,16 +8,16 @@ namespace SepCore.Editor
{
public static class GameFrameworkConfigs
{
[BuildSettingsConfigPath]
public static string BuildSettingsConfig = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/BuildSettings.xml"));
[BuildSettingsConfigPath] public static string BuildSettingsConfig =
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/BuildSettings.xml"));
[ResourceCollectionConfigPath]
public static string ResourceCollectionConfig = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceCollection.xml"));
[ResourceCollectionConfigPath] public static string ResourceCollectionConfig =
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceCollection.xml"));
[ResourceEditorConfigPath]
public static string ResourceEditorConfig = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceEditor.xml"));
[ResourceEditorConfigPath] public static string ResourceEditorConfig =
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceEditor.xml"));
[ResourceBuilderConfigPath]
public static string ResourceBuilderConfig = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceBuilder.xml"));
[ResourceBuilderConfigPath] public static string ResourceBuilderConfig =
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceBuilder.xml"));
}
}

View File

@ -1,11 +1,11 @@
using System;
using System.Linq;
using CustomComponent;
using SepCore.DataTable;
using SepCore.Definition;
using Entity;
using CustomUtility;
using Procedure;
using SepCore.Entity;
using SepCore.Procedure;
using SepCore.EnemyManager;
using SepCore.CustomUtility;
using UnityEditor;
using UnityEngine;

View File

@ -1,13 +1,13 @@
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using SepCore.CustomComponent;
using SepCore.UI;
using SepCore.UIRouter;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
namespace UIModule.Editor
namespace SepCore.Editor
{
[CustomEditor(typeof(UIRouterComponent))]
public class UIRouterComponentEditor : UnityEditor.Editor

View File

@ -10,17 +10,19 @@ namespace SepCore.Editor
{
public bool ContinueOnFailure
{
get
{
return false;
}
get { return false; }
}
public void OnPreprocessAllPlatforms(string productName, string companyName, string gameIdentifier, string gameFrameworkVersion, string unityVersion, string applicableGameVersion, int internalResourceVersion,
Platform platforms, AssetBundleCompressionType assetBundleCompression, string compressionHelperTypeName, bool additionalCompressionSelected, bool forceRebuildAssetBundleSelected, string buildEventHandlerTypeName, string outputDirectory, BuildAssetBundleOptions buildAssetBundleOptions,
string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected, string outputPackedPath, string buildReportPath)
public void OnPreprocessAllPlatforms(string productName, string companyName, string gameIdentifier,
string gameFrameworkVersion, string unityVersion, string applicableGameVersion, int internalResourceVersion,
Platform platforms, AssetBundleCompressionType assetBundleCompression, string compressionHelperTypeName,
bool additionalCompressionSelected, bool forceRebuildAssetBundleSelected, string buildEventHandlerTypeName,
string outputDirectory, BuildAssetBundleOptions buildAssetBundleOptions,
string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected,
string outputFullPath, bool outputPackedSelected, string outputPackedPath, string buildReportPath)
{
string streamingAssetsPath = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "StreamingAssets"));
string streamingAssetsPath =
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "StreamingAssets"));
string[] fileNames = Directory.GetFiles(streamingAssetsPath, "*", SearchOption.AllDirectories);
foreach (string fileName in fileNames)
{
@ -35,25 +37,36 @@ namespace SepCore.Editor
Utility.Path.RemoveEmptyDirectory(streamingAssetsPath);
}
public void OnPostprocessAllPlatforms(string productName, string companyName, string gameIdentifier, string gameFrameworkVersion, string unityVersion, string applicableGameVersion, int internalResourceVersion,
Platform platforms, AssetBundleCompressionType assetBundleCompression, string compressionHelperTypeName, bool additionalCompressionSelected, bool forceRebuildAssetBundleSelected, string buildEventHandlerTypeName, string outputDirectory, BuildAssetBundleOptions buildAssetBundleOptions,
string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected, string outputPackedPath, string buildReportPath)
public void OnPostprocessAllPlatforms(string productName, string companyName, string gameIdentifier,
string gameFrameworkVersion, string unityVersion, string applicableGameVersion, int internalResourceVersion,
Platform platforms, AssetBundleCompressionType assetBundleCompression, string compressionHelperTypeName,
bool additionalCompressionSelected, bool forceRebuildAssetBundleSelected, string buildEventHandlerTypeName,
string outputDirectory, BuildAssetBundleOptions buildAssetBundleOptions,
string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected,
string outputFullPath, bool outputPackedSelected, string outputPackedPath, string buildReportPath)
{
}
public void OnPreprocessPlatform(Platform platform, string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected, string outputPackedPath)
public void OnPreprocessPlatform(Platform platform, string workingPath, bool outputPackageSelected,
string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected,
string outputPackedPath)
{
}
public void OnBuildAssetBundlesComplete(Platform platform, string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected, string outputPackedPath, AssetBundleManifest assetBundleManifest)
public void OnBuildAssetBundlesComplete(Platform platform, string workingPath, bool outputPackageSelected,
string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected,
string outputPackedPath, AssetBundleManifest assetBundleManifest)
{
}
public void OnOutputUpdatableVersionListData(Platform platform, string versionListPath, int versionListLength, int versionListHashCode, int versionListCompressedLength, int versionListCompressedHashCode)
public void OnOutputUpdatableVersionListData(Platform platform, string versionListPath, int versionListLength,
int versionListHashCode, int versionListCompressedLength, int versionListCompressedHashCode)
{
}
public void OnPostprocessPlatform(Platform platform, string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected, string outputPackedPath, bool isSuccess)
public void OnPostprocessPlatform(Platform platform, string workingPath, bool outputPackageSelected,
string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected,
string outputPackedPath, bool isSuccess)
{
if (!outputPackageSelected)
{
@ -65,11 +78,13 @@ namespace SepCore.Editor
return;
}
string streamingAssetsPath = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "StreamingAssets"));
string streamingAssetsPath =
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "StreamingAssets"));
string[] fileNames = Directory.GetFiles(outputPackagePath, "*", SearchOption.AllDirectories);
foreach (string fileName in fileNames)
{
string destFileName = Utility.Path.GetRegularPath(Path.Combine(streamingAssetsPath, fileName.Substring(outputPackagePath.Length)));
string destFileName = Utility.Path.GetRegularPath(Path.Combine(streamingAssetsPath,
fileName.Substring(outputPackagePath.Length)));
FileInfo destFileInfo = new FileInfo(destFileName);
if (!destFileInfo.Directory.Exists)
{

View File

@ -1,4 +1,4 @@
using StarForce;
using SepCore.Sound;
using UnityEngine;
using UnityEngine.UI;
using UnityGameFramework.Runtime;

View File

@ -1,4 +1,4 @@
using CustomUtility;
using SepCore.CustomUtility;
using SepCore.DataTable;
using SepCore.Definition;
using UnityEngine;

View File

@ -1,8 +1,8 @@
using System;
using System.Drawing;
using CustomUtility;
using Entity.EntityData;
using Entity.Weapon;
using SepCore.CustomUtility;
using SepCore.Entity;
using SepCore.Entity.Weapon;
using SepCore.Definition;
using UnityEngine;

View File

@ -1,6 +1,6 @@
using CustomComponent;
using SepCore.Event;
using GameFramework.Event;
using SepCore.EnemyManager;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@ -139,4 +139,4 @@ namespace SepCore.UI
#endregion
}
}
}

View File

@ -2,7 +2,7 @@ using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using SepCore.Event;
using SepCore.Definition;
using CustomUtility;
using SepCore.CustomUtility;
using GameFramework.Event;
using UnityGameFramework.Runtime;

View File

@ -2,8 +2,8 @@ using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using SepCore.Event;
using SepCore.Definition;
using CustomUtility;
using Entity.Weapon;
using SepCore.CustomUtility;
using SepCore.Entity.Weapon;
using GameFramework.Event;
using UnityEngine;
using UnityGameFramework.Runtime;

View File

@ -7,7 +7,7 @@
using SepCore.Definition;
using GameFramework.Localization;
using StarForce;
using SepCore.Sound;
using UnityEngine;
using UnityEngine.UI;
using UnityGameFramework.Runtime;
@ -186,4 +186,4 @@ namespace SepCore.UI
_languageTipsCanvasGroup.gameObject.SetActive(_selectedLanguage != GameEntry.Localization.Language);
}
}
}
}

View File

@ -2,12 +2,12 @@ using System.Collections.Generic;
using System.Text;
using SepCore.DataTable;
using SepCore.Definition;
using Entity.EntityData;
using Entity.Weapon;
using SepCore.Entity;
using SepCore.Entity.Weapon;
using System;
using UnityGameFramework.Runtime;
namespace CustomUtility
namespace SepCore.CustomUtility
{
public static class ItemDescUtility
{

View File

@ -5,7 +5,7 @@
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
namespace Procedure
namespace SepCore.Procedure
{
public abstract class ProcedureBase : GameFramework.Procedure.ProcedureBase
{

View File

@ -9,12 +9,12 @@ using SepCore.DataTable;
using SepCore.Definition;
using GameFramework.DataTable;
using GameFramework.Event;
using StarForce;
using SepCore.Sound;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
using CustomUtility;
using SepCore.CustomUtility;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureChangeScene : ProcedureBase
{

View File

@ -1,7 +1,7 @@
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureCheckResources : ProcedureBase
{

View File

@ -8,7 +8,7 @@ using UnityEngine;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureCheckVersion : ProcedureBase
{

View File

@ -8,7 +8,7 @@
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureInitResources : ProcedureBase
{

View File

@ -8,11 +8,11 @@
using GameFramework.Localization;
using System;
using SepCore.Definition;
using StarForce;
using SepCore.Sound;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureLaunch : ProcedureBase
{

View File

@ -4,14 +4,14 @@ using GameFramework.Resource;
using System.Collections.Generic;
using SepCore.DataTable;
using SepCore.Definition;
using CustomUtility;
using SepCore.CustomUtility;
using TMPro;
using SepCore.UI;
using UnityEngine;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedurePreload : ProcedureBase
{

View File

@ -9,7 +9,7 @@ using GameFramework.Resource;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureSplash : ProcedureBase
{

View File

@ -8,7 +8,7 @@ using UnityEngine;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureUpdateResources : ProcedureBase
{
@ -93,8 +93,7 @@ namespace Procedure
{
if (m_UpdateResourceForm == null)
{
m_UpdateResourceForm = Object.Instantiate(GameEntry.BuiltinData.UpdateResourceFormTemplate)
.GetComponent<UpdateResourceForm>();
m_UpdateResourceForm = Object.Instantiate(GameEntry.BuiltinData.UpdateResourceFormTemplate).GetComponent<UpdateResourceForm>();
}
Log.Info("Start update resources...");

View File

@ -9,7 +9,7 @@ using GameFramework.Resource;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureUpdateVersion : ProcedureBase
{

View File

@ -1,9 +1,8 @@
using GameFramework.Event;
using StarForce;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureVerifyResources : ProcedureBase
{

View File

@ -4,7 +4,7 @@ using GameFramework.Fsm;
using GameFramework.Procedure;
using UnityEngine;
namespace Procedure
namespace SepCore.Procedure
{
public abstract class GameStateBase
{

View File

@ -1,14 +1,14 @@
using System;
using CustomComponent;
using SepCore.Event;
using SepCore.DataTable;
using Entity;
using SepCore.Entity;
using GameFramework.Fsm;
using GameFramework.Procedure;
using Simulation;
using SepCore.EnemyManager;
using SepCore.Simulation;
using UnityEngine;
namespace Procedure
namespace SepCore.Procedure
{
public class GameStateBattle : GameStateBase
{

View File

@ -5,7 +5,7 @@ using GameFramework.Procedure;
using SepCore.UI;
using UnityGameFramework.Runtime;
namespace Procedure
namespace SepCore.Procedure
{
public class GameStateLevelUp : GameStateBase
{

View File

@ -5,7 +5,7 @@ using GameFramework.Procedure;
using SepCore.UI;
using UnityGameFramework.Runtime;
namespace Procedure
namespace SepCore.Procedure
{
public class GameStateShop : GameStateBase
{

View File

@ -2,15 +2,14 @@ using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using SepCore.DataTable;
using SepCore.Definition;
using Entity;
using Entity.EntityData;
using SepCore.Entity;
using GameFramework.Event;
using GameFramework.Fsm;
using GameFramework.Procedure;
using UnityGameFramework.Runtime;
using SepCore.UI;
namespace Procedure
namespace SepCore.Procedure
{
public enum GameStateType
{

View File

@ -5,7 +5,7 @@ using UnityEngine;
using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureMenu : ProcedureBase
{

View File

@ -1,11 +1,9 @@
using CustomComponent;
using Entity.EntityData;
using GameFramework.Fsm;
using GameFramework.Procedure;
using StarForce;
using SepCore.EnemyManager;
using UnityGameFramework.Runtime;
namespace Procedure
namespace SepCore.Procedure
{
public class ProcedureStressTest : ProcedureBase
{

View File

@ -1,7 +1,10 @@
using CustomComponent;
using SepCore.CustomComponent;
using Simulation;
using UnityEngine;
using SepCore.BuiltinData;
using SepCore.DamageText;
using SepCore.EnemyManager;
using SepCore.HPBar;
using SepCore.SpriteCache;
using SepCore.UIRouter;
using SepCore.Simulation;
/// <summary>
/// 游戏入口。

View File

@ -3,7 +3,7 @@ using System.Threading;
using Cysharp.Threading.Tasks;
using GameFramework.Event;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// 异步任务辅助类,用于将事件回调转换为 UniTask
@ -124,4 +124,4 @@ namespace UnityGameFramework.Runtime.AsyncTask
return tcs.Task;
}
}
}
}

View File

@ -1,10 +1,7 @@
using System;
using Cysharp.Threading.Tasks;
using GameFramework;
using GameFramework.Config;
using UnityGameFramework.Runtime;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// Config 异步扩展方法

View File

@ -5,7 +5,7 @@ using GameFramework.DataTable;
using SepCore.DataTable;
using UnityGameFramework.Runtime;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// DataTable 异步扩展方法

View File

@ -1,10 +1,9 @@
using System;
using Cysharp.Threading.Tasks;
using GameFramework;
using GameFramework.Download;
using UnityGameFramework.Runtime;
using DownloadFailureEventArgs = UnityGameFramework.Runtime.DownloadFailureEventArgs;
using DownloadSuccessEventArgs = UnityGameFramework.Runtime.DownloadSuccessEventArgs;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// Download 异步扩展方法

View File

@ -1,10 +1,11 @@
using System;
using Cysharp.Threading.Tasks;
using GameFramework;
using GameFramework.Entity;
using UnityGameFramework.Runtime;
using HideEntityCompleteEventArgs = UnityGameFramework.Runtime.HideEntityCompleteEventArgs;
using ShowEntityFailureEventArgs = UnityGameFramework.Runtime.ShowEntityFailureEventArgs;
using ShowEntitySuccessEventArgs = UnityGameFramework.Runtime.ShowEntitySuccessEventArgs;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// Entity 异步扩展方法
@ -22,7 +23,7 @@ namespace UnityGameFramework.Runtime.AsyncTask
/// <param name="userData">用户自定义数据</param>
/// <param name="timeout">超时时间0表示不超时</param>
/// <returns>显示的实体</returns>
public static UniTask<Entity> ShowEntityAsync(this EntityComponent entityComponent,
public static UniTask<UnityGameFramework.Runtime.Entity> ShowEntityAsync(this EntityComponent entityComponent,
int entityId,
Type entityLogicType,
string entityAssetName,
@ -30,7 +31,7 @@ namespace UnityGameFramework.Runtime.AsyncTask
object userData = null,
float timeout = 30f)
{
UniTask<Entity> waitTask = AsyncTaskHelper.WaitSuccessOrFailureAsync<ShowEntitySuccessEventArgs, ShowEntityFailureEventArgs>(
UniTask<UnityGameFramework.Runtime.Entity> waitTask = AsyncTaskHelper.WaitSuccessOrFailureAsync<ShowEntitySuccessEventArgs, ShowEntityFailureEventArgs>(
ShowEntitySuccessEventArgs.EventId,
ShowEntityFailureEventArgs.EventId,
successArgs => successArgs.Entity.Id == entityId && ReferenceEquals(successArgs.UserData, userData),
@ -104,7 +105,7 @@ namespace UnityGameFramework.Runtime.AsyncTask
/// <param name="timeout">超时时间0表示不超时</param>
/// <returns>隐藏完成事件</returns>
public static UniTask<HideEntityCompleteEventArgs> HideEntityAsync(this EntityComponent entityComponent,
Entity entity,
UnityGameFramework.Runtime.Entity entity,
object userData = null,
float timeout = 30f)
{

View File

@ -4,7 +4,7 @@ using GameFramework;
using GameFramework.Localization;
using UnityGameFramework.Runtime;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// Localization 异步扩展方法

View File

@ -1,10 +1,9 @@
using System;
using Cysharp.Threading.Tasks;
using GameFramework;
using GameFramework.Network;
using UnityGameFramework.Runtime;
using NetworkClosedEventArgs = UnityGameFramework.Runtime.NetworkClosedEventArgs;
using NetworkConnectedEventArgs = UnityGameFramework.Runtime.NetworkConnectedEventArgs;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// Network 异步扩展方法
@ -73,4 +72,4 @@ namespace UnityGameFramework.Runtime.AsyncTask
);
}
}
}
}

View File

@ -1,10 +1,10 @@
using System;
using Cysharp.Threading.Tasks;
using GameFramework;
using GameFramework.Resource;
using UnityGameFramework.Runtime;
using ResourceApplySuccessEventArgs = UnityGameFramework.Runtime.ResourceApplySuccessEventArgs;
using ResourceUpdateAllCompleteEventArgs = UnityGameFramework.Runtime.ResourceUpdateAllCompleteEventArgs;
using ResourceVerifySuccessEventArgs = UnityGameFramework.Runtime.ResourceVerifySuccessEventArgs;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// Resource 异步扩展方法
@ -59,4 +59,4 @@ namespace UnityGameFramework.Runtime.AsyncTask
);
}
}
}
}

View File

@ -1,10 +1,11 @@
using System;
using Cysharp.Threading.Tasks;
using GameFramework;
using GameFramework.Scene;
using UnityGameFramework.Runtime;
using LoadSceneFailureEventArgs = UnityGameFramework.Runtime.LoadSceneFailureEventArgs;
using LoadSceneSuccessEventArgs = UnityGameFramework.Runtime.LoadSceneSuccessEventArgs;
using UnloadSceneFailureEventArgs = UnityGameFramework.Runtime.UnloadSceneFailureEventArgs;
using UnloadSceneSuccessEventArgs = UnityGameFramework.Runtime.UnloadSceneSuccessEventArgs;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// Scene 异步扩展方法

View File

@ -1,10 +1,10 @@
using System;
using Cysharp.Threading.Tasks;
using GameFramework;
using GameFramework.Sound;
using UnityGameFramework.Runtime;
using PlaySoundFailureEventArgs = UnityGameFramework.Runtime.PlaySoundFailureEventArgs;
using PlaySoundSuccessEventArgs = UnityGameFramework.Runtime.PlaySoundSuccessEventArgs;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// Sound 异步扩展方法
@ -29,17 +29,17 @@ namespace UnityGameFramework.Runtime.AsyncTask
float timeout = 30f)
{
int serialId = 0;
UniTask<PlaySoundSuccessEventArgs> waitTask = AsyncTaskHelper.WaitSuccessOrFailureAsync<PlaySoundSuccessEventArgs, PlaySoundFailureEventArgs>(
PlaySoundSuccessEventArgs.EventId,
PlaySoundFailureEventArgs.EventId,
successArgs => successArgs.SerialId == serialId,
failureArgs => failureArgs.SerialId == serialId,
timeout
);
UniTask<PlaySoundSuccessEventArgs> waitTask =
AsyncTaskHelper.WaitSuccessOrFailureAsync<PlaySoundSuccessEventArgs, PlaySoundFailureEventArgs>(
PlaySoundSuccessEventArgs.EventId,
PlaySoundFailureEventArgs.EventId,
successArgs => successArgs.SerialId == serialId,
failureArgs => failureArgs.SerialId == serialId,
timeout
);
serialId = soundComponent.PlaySound(soundAssetName, soundGroupName, 0, playSoundParams, userData);
return waitTask;
}
}
}

View File

@ -3,7 +3,7 @@ using SepCore.Definition;
using SepCore.UI;
using UnityGameFramework.Runtime;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// UI 异步扩展方法

View File

@ -1,10 +1,7 @@
using System;
using Cysharp.Threading.Tasks;
using GameFramework;
using GameFramework.WebRequest;
using UnityGameFramework.Runtime;
namespace UnityGameFramework.Runtime.AsyncTask
namespace SepCore.AsyncTask
{
/// <summary>
/// WebRequest 异步扩展方法

View File

@ -1,18 +1,18 @@
using System;
using System.Collections.Generic;
using SepCore.Definition;
using Entity.EntityData;
using SepCore.Entity;
using UnityGameFramework.Runtime;
using SepCore.DataTable;
using CustomUtility;
using SepCore.CustomUtility;
namespace Entity
namespace SepCore.Entity
{
public static class EntityExtension
{
private static int s_SerialId = -10;
private const string EntityNamespace = "Entity.";
private const string EntityNamespace = "SepCore.Entity.";
private static readonly Dictionary<string, Type> _typeDict;
private static readonly Dictionary<int, string> _assetNameDict;
@ -180,9 +180,9 @@ namespace Entity
return assetName;
}
public static int GenerateSerialId(this EntityComponent entityComponent)
public static int NextId(this EntityComponent entityComponent)
{
return --s_SerialId;
}
}
}
}

View File

@ -1,16 +1,9 @@
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using GameFramework.Localization;
using GameFramework.Localization;
using System;
using System.Xml;
using UnityGameFramework.Runtime;
namespace StarForce
namespace SepCore.Localization
{
/// <summary>
/// XML 格式的本地化辅助器。

View File

@ -5,7 +5,7 @@
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
namespace StarForce
namespace SepCore.Network
{
public abstract class CSPacketBase : PacketBase
{

View File

@ -5,7 +5,7 @@
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
namespace StarForce
namespace SepCore.Network
{
public sealed class CSPacketHeader : PacketHeaderBase
{

Some files were not shown because too many files have changed in this diff Show More