Compare commits

..

No commits in common. "edd7088804600cdf2376e1f2bb80504a0e41e194" and "91f70dd783e78e831a1323d987e57d4e9cd98325" have entirely different histories.

238 changed files with 837 additions and 720 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using GameFramework; using System.IO;
using System.Text;
using SepCore.Definition; using SepCore.Definition;
using GameFramework;
using StarForce;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace SepCore.DataTable namespace SepCore.DataTable

View File

@ -1,8 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using GameFramework;
using SepCore.Definition; using SepCore.Definition;
using SepCore.CustomUtility; using GameFramework;
using CustomUtility;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;

View File

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

View File

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

View File

@ -1,31 +0,0 @@
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,20 +0,0 @@
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

@ -1,51 +0,0 @@
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,27 +0,0 @@
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

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
using System.IO; using GameFramework;
using GameFramework; using System.IO;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Editor; using UnityGameFramework.Editor;
using UnityGameFramework.Editor.ResourceTools; using UnityGameFramework.Editor.ResourceTools;
@ -8,16 +8,16 @@ namespace SepCore.Editor
{ {
public static class GameFrameworkConfigs public static class GameFrameworkConfigs
{ {
[BuildSettingsConfigPath] public static string BuildSettingsConfig = [BuildSettingsConfigPath]
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/BuildSettings.xml")); public static string BuildSettingsConfig = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/BuildSettings.xml"));
[ResourceCollectionConfigPath] public static string ResourceCollectionConfig = [ResourceCollectionConfigPath]
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceCollection.xml")); public static string ResourceCollectionConfig = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceCollection.xml"));
[ResourceEditorConfigPath] public static string ResourceEditorConfig = [ResourceEditorConfigPath]
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceEditor.xml")); public static string ResourceEditorConfig = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceEditor.xml"));
[ResourceBuilderConfigPath] public static string ResourceBuilderConfig = [ResourceBuilderConfigPath]
Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "GameMain/Configs/ResourceBuilder.xml")); 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;
using System.Linq; using System.Linq;
using CustomComponent;
using SepCore.DataTable; using SepCore.DataTable;
using SepCore.Definition; using SepCore.Definition;
using SepCore.Entity; using Entity;
using SepCore.Procedure; using CustomUtility;
using SepCore.EnemyManager; using Procedure;
using SepCore.CustomUtility;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
using CustomComponent;
using SepCore.Event; using SepCore.Event;
using GameFramework.Event; using GameFramework.Event;
using SepCore.EnemyManager;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;

View File

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

View File

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

View File

@ -7,7 +7,7 @@
using SepCore.Definition; using SepCore.Definition;
using GameFramework.Localization; using GameFramework.Localization;
using SepCore.Sound; using StarForce;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ using UnityEngine;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>; using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
namespace SepCore.Procedure namespace Procedure
{ {
public class ProcedureUpdateResources : ProcedureBase public class ProcedureUpdateResources : ProcedureBase
{ {
@ -93,7 +93,8 @@ namespace SepCore.Procedure
{ {
if (m_UpdateResourceForm == null) 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..."); Log.Info("Start update resources...");

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@ using System.IO;
using System.Reflection; using System.Reflection;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace SepCore.Network namespace StarForce
{ {
public class NetworkChannelHelper : INetworkChannelHelper public class NetworkChannelHelper : INetworkChannelHelper
{ {

View File

@ -8,7 +8,7 @@
using ProtoBuf; using ProtoBuf;
using System; using System;
namespace SepCore.Network namespace StarForce
{ {
[Serializable, ProtoContract(Name = @"CSHeartBeat")] [Serializable, ProtoContract(Name = @"CSHeartBeat")]
public class CSHeartBeat : CSPacketBase public class CSHeartBeat : CSPacketBase

View File

@ -8,7 +8,7 @@
using ProtoBuf; using ProtoBuf;
using System; using System;
namespace SepCore.Network namespace StarForce
{ {
[Serializable, ProtoContract(Name = @"SCHeartBeat")] [Serializable, ProtoContract(Name = @"SCHeartBeat")]
public class SCHeartBeat : SCPacketBase public class SCHeartBeat : SCPacketBase

View File

@ -8,7 +8,7 @@
using GameFramework.Network; using GameFramework.Network;
using ProtoBuf; using ProtoBuf;
namespace SepCore.Network namespace StarForce
{ {
public abstract class PacketBase : Packet, IExtensible public abstract class PacketBase : Packet, IExtensible
{ {

View File

@ -8,7 +8,7 @@
using GameFramework.Network; using GameFramework.Network;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace SepCore.Network namespace StarForce
{ {
public class SCHeartBeatHandler : PacketHandlerBase public class SCHeartBeatHandler : PacketHandlerBase
{ {

View File

@ -7,7 +7,7 @@
using GameFramework.Network; using GameFramework.Network;
namespace SepCore.Network namespace StarForce
{ {
public abstract class PacketHandlerBase : IPacketHandler public abstract class PacketHandlerBase : IPacketHandler
{ {

View File

@ -8,7 +8,7 @@
using GameFramework; using GameFramework;
using GameFramework.Network; using GameFramework.Network;
namespace SepCore.Network namespace StarForce
{ {
public abstract class PacketHeaderBase : IPacketHeader, IReference public abstract class PacketHeaderBase : IPacketHeader, IReference
{ {

View File

@ -5,7 +5,7 @@
// Feedback: mailto:ellan@gameframework.cn // Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------ //------------------------------------------------------------
namespace SepCore.Network namespace StarForce
{ {
public enum PacketType : byte public enum PacketType : byte
{ {

View File

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

View File

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

View File

@ -1,13 +1,20 @@
using GameFramework; //------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using SepCore.DataTable; using SepCore.DataTable;
using SepCore.Definition; using SepCore.Definition;
using SepCore.Entity; using Entity;
using GameFramework;
using GameFramework.DataTable; using GameFramework.DataTable;
using GameFramework.Sound; using GameFramework.Sound;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
using SepCore.CustomUtility; using CustomUtility;
namespace SepCore.Sound namespace StarForce
{ {
public static class SoundExtension public static class SoundExtension
{ {

View File

@ -2,7 +2,7 @@
using GameFramework.UI; using GameFramework.UI;
using SepCore.DataTable; using SepCore.DataTable;
using SepCore.Definition; using SepCore.Definition;
using SepCore.CustomUtility; using CustomUtility;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace SepCore.UI namespace SepCore.UI

View File

@ -1,9 +1,9 @@
using System; using System;
using SepCore.Definition; using SepCore.Definition;
using SepCore.Entity; using Entity;
using UnityEngine; using UnityEngine;
namespace SepCore.Components namespace Components
{ {
public class AbsorbComponent : MonoBehaviour public class AbsorbComponent : MonoBehaviour
{ {

View File

@ -1,10 +1,10 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using SepCore.Entity; using Entity;
using SepCore.Entity.Weapon; using Entity.Weapon;
using UnityEngine; using UnityEngine;
namespace SepCore.Components namespace Components
{ {
public class AttackComponent : MonoBehaviour public class AttackComponent : MonoBehaviour
{ {

View File

@ -1,10 +1,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using SepCore.Definition; using SepCore.Definition;
using SepCore.Entity.Weapon; using Entity.Weapon;
using SepCore.Entity; using Entity;
using UnityEngine; using UnityEngine;
namespace SepCore.Components namespace Components
{ {
public class BackpackComponent : MonoBehaviour public class BackpackComponent : MonoBehaviour
{ {
@ -81,21 +81,14 @@ namespace SepCore.Components
public bool AttachProp(PropItem prop) public bool AttachProp(PropItem prop)
{ {
_props.Add(prop); _props.Add(prop);
foreach (var modifier in prop.Modifiers) prop.OnAttach(_statComponent);
{
_statComponent.AddModifier(modifier);
}
return true; return true;
} }
public bool DetachProp(PropItem prop) public bool DetachProp(PropItem prop)
{ {
_props.Remove(prop); _props.Remove(prop);
foreach (var modifier in prop.Modifiers) prop.OnDetach(_statComponent);
{
_statComponent.RemoveModifier(modifier);
}
return true; return true;
} }

View File

@ -3,7 +3,7 @@ using SepCore.Event;
using SepCore.Definition; using SepCore.Definition;
using UnityEngine; using UnityEngine;
namespace SepCore.Components namespace Components
{ {
public class HealthComponent : MonoBehaviour public class HealthComponent : MonoBehaviour
{ {

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace SepCore.Components namespace Components
{ {
public class InputComponent : MonoBehaviour public class InputComponent : MonoBehaviour
{ {

View File

@ -1,11 +1,11 @@
using System; using System;
using SepCore.Definition; using SepCore.Definition;
using SepCore.Entity; using Entity;
using SepCore.Simulation; using Simulation;
using UnityEngine; using UnityEngine;
using SepCore.Debugger; using CustomDebugger;
namespace SepCore.Components namespace Components
{ {
public class MovementComponent : MonoBehaviour public class MovementComponent : MonoBehaviour
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using SepCore.Definition; using SepCore.Definition;
using UnityEngine; using UnityEngine;
namespace SepCore.Components namespace Components
{ {
public class StatComponent : MonoBehaviour public class StatComponent : MonoBehaviour
{ {

View File

@ -1,21 +1,34 @@
using GameFramework; //------------------------------------------------------------
// 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;
using StarForce;
using SepCore.UI;
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace SepCore.BuiltinData namespace CustomComponent
{ {
public class BuiltinDataComponent : GameFrameworkComponent public class BuiltinDataComponent : GameFrameworkComponent
{ {
[SerializeField] private TextAsset _buildInfoTextAsset = null; [FormerlySerializedAs("m_BuildInfoTextAsset")] [SerializeField]
private TextAsset _buildInfoTextAsset = null;
[SerializeField] private TextAsset _defaultDictionaryTextAsset = null; [FormerlySerializedAs("m_DefaultDictionaryTextAsset")] [SerializeField]
private TextAsset _defaultDictionaryTextAsset = null;
[SerializeField] private GameObject _updateResourceFormTemplate = null; [FormerlySerializedAs("m_UpdateResourceFormTemplate")] [SerializeField]
private GameObject _updateResourceFormTemplate = null;
private BuildInfo _buildInfo = null; private BuildInfo m_BuildInfo = null;
public BuildInfo BuildInfo => _buildInfo; public BuildInfo BuildInfo => m_BuildInfo;
public GameObject UpdateResourceFormTemplate => _updateResourceFormTemplate; public GameObject UpdateResourceFormTemplate => _updateResourceFormTemplate;
@ -27,8 +40,8 @@ namespace SepCore.BuiltinData
return; return;
} }
_buildInfo = Utility.Json.ToObject<BuildInfo>(_buildInfoTextAsset.text); m_BuildInfo = Utility.Json.ToObject<BuildInfo>(_buildInfoTextAsset.text);
if (_buildInfo == null) if (m_BuildInfo == null)
{ {
Log.Warning("Parse build info failure."); Log.Warning("Parse build info failure.");
return; return;

View File

@ -3,7 +3,7 @@ using GameFramework.ObjectPool;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace SepCore.DamageText namespace CustomComponent
{ {
public class DamageTextComponent : GameFrameworkComponent public class DamageTextComponent : GameFrameworkComponent
{ {

View File

@ -3,7 +3,7 @@ using DG.Tweening;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
namespace SepCore.DamageText namespace CustomComponent
{ {
public class DamageTextItem : MonoBehaviour public class DamageTextItem : MonoBehaviour
{ {

View File

@ -2,7 +2,7 @@ using GameFramework;
using GameFramework.ObjectPool; using GameFramework.ObjectPool;
using UnityEngine; using UnityEngine;
namespace SepCore.DamageText namespace CustomComponent
{ {
public class DamageTextItemObject : ObjectBase public class DamageTextItemObject : ObjectBase
{ {

View File

@ -1,14 +1,14 @@
using System.Collections.Generic; using System.Collections.Generic;
using SepCore.DataTable; using SepCore.DataTable;
using SepCore.Definition; using SepCore.Definition;
using SepCore.Entity; using Entity;
using Entity.EntityData;
using GameFramework.Event; using GameFramework.Event;
using SepCore.CustomUtility;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
using Random = UnityEngine.Random; using Random = UnityEngine.Random;
namespace SepCore.EnemyManager namespace CustomComponent
{ {
public class EnemyManagerComponent : GameFrameworkComponent public class EnemyManagerComponent : GameFrameworkComponent
{ {
@ -136,8 +136,10 @@ namespace SepCore.EnemyManager
if (_currentEnemyCount >= _spawnEnemyMaxCount) return; if (_currentEnemyCount >= _spawnEnemyMaxCount) return;
int entityPoolId = _currentSpawnEnemyId % _spawnEnemyMaxCount; int entityPoolId = _currentSpawnEnemyId % _spawnEnemyMaxCount;
var enemyData = EntityDataFactory.Create(entityPoolId, enemyType, _currentLevel); var enemyData = new EnemyData(entityPoolId, enemyType, _currentLevel)
enemyData.Position = GetRandomPosition(); {
Position = GetRandomPosition()
};
_entity.ShowEnemy(enemyData); _entity.ShowEnemy(enemyData);
_currentSpawnEnemyId++; _currentSpawnEnemyId++;
} }

View File

@ -1,10 +1,11 @@
using GameFramework.ObjectPool; using GameFramework.ObjectPool;
using System.Collections.Generic; using System.Collections.Generic;
using SepCore.Entity; using Entity;
using StarForce;
using UnityEngine; using UnityEngine;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace SepCore.HPBar namespace CustomComponent
{ {
public class HPBarComponent : GameFrameworkComponent public class HPBarComponent : GameFrameworkComponent
{ {

View File

@ -1,12 +1,12 @@
using System.Collections; using System.Collections;
using SepCore.Entity; using Entity;
using SepCore.UI; using SepCore.UI;
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization; using UnityEngine.Serialization;
using UnityEngine.UI; using UnityEngine.UI;
using UnityGameFramework.Runtime; using UnityGameFramework.Runtime;
namespace SepCore.HPBar namespace StarForce
{ {
public class HPBarItem : MonoBehaviour public class HPBarItem : MonoBehaviour
{ {

View File

@ -1,8 +1,15 @@
using GameFramework; //------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using GameFramework;
using GameFramework.ObjectPool; using GameFramework.ObjectPool;
using UnityEngine; using UnityEngine;
namespace SepCore.HPBar namespace StarForce
{ {
public class HPBarItemObject : ObjectBase public class HPBarItemObject : ObjectBase
{ {

View File

@ -1,7 +1,7 @@
using Unity.Mathematics; using Unity.Mathematics;
using UnityEngine; using UnityEngine;
namespace SepCore.Simulation namespace Simulation
{ {
public sealed partial class SimulationWorld public sealed partial class SimulationWorld
{ {

View File

@ -1,6 +1,6 @@
using Unity.Mathematics; using Unity.Mathematics;
namespace SepCore.Simulation namespace Simulation
{ {
public sealed partial class SimulationWorld public sealed partial class SimulationWorld
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Unity.Collections; using Unity.Collections;
namespace SepCore.Simulation namespace Simulation
{ {
public sealed partial class SimulationWorld public sealed partial class SimulationWorld
{ {

View File

@ -1,7 +1,7 @@
using Unity.Mathematics; using Unity.Mathematics;
using UnityEngine; using UnityEngine;
namespace SepCore.Simulation namespace Simulation
{ {
public sealed partial class SimulationWorld public sealed partial class SimulationWorld
{ {

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