规范命名空间
具体来说就是 SepCore 开头,然后接所属的模块名,比如 SepCore.Entity,SepCore.Simulation,SepCore.Procedure
This commit is contained in:
+2
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 异步扩展方法
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ using GameFramework.DataTable;
|
||||
using SepCore.DataTable;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace UnityGameFramework.Runtime.AsyncTask
|
||||
namespace SepCore.AsyncTask
|
||||
{
|
||||
/// <summary>
|
||||
/// DataTable 异步扩展方法
|
||||
|
||||
+3
-4
@@ -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 异步扩展方法
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ using GameFramework;
|
||||
using GameFramework.Localization;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace UnityGameFramework.Runtime.AsyncTask
|
||||
namespace SepCore.AsyncTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Localization 异步扩展方法
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 异步扩展方法
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using SepCore.Definition;
|
||||
using SepCore.UI;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace UnityGameFramework.Runtime.AsyncTask
|
||||
namespace SepCore.AsyncTask
|
||||
{
|
||||
/// <summary>
|
||||
/// UI 异步扩展方法
|
||||
|
||||
+1
-4
@@ -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 异步扩展方法
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-9
@@ -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 格式的本地化辅助器。
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public abstract class CSPacketBase : PacketBase
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public sealed class CSPacketHeader : PacketHeaderBase
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ using System.IO;
|
||||
using System.Reflection;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public class NetworkChannelHelper : INetworkChannelHelper
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
using ProtoBuf;
|
||||
using System;
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
[Serializable, ProtoContract(Name = @"CSHeartBeat")]
|
||||
public class CSHeartBeat : CSPacketBase
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
using ProtoBuf;
|
||||
using System;
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
[Serializable, ProtoContract(Name = @"SCHeartBeat")]
|
||||
public class SCHeartBeat : SCPacketBase
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
using GameFramework.Network;
|
||||
using ProtoBuf;
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public abstract class PacketBase : Packet, IExtensible
|
||||
{
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
using GameFramework.Network;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public class SCHeartBeatHandler : PacketHandlerBase
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
using GameFramework.Network;
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public abstract class PacketHandlerBase : IPacketHandler
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Network;
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public abstract class PacketHeaderBase : IPacketHeader, IReference
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public enum PacketType : byte
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public abstract class SCPacketBase : PacketBase
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Network
|
||||
{
|
||||
public sealed class SCPacketHeader : PacketHeaderBase
|
||||
{
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
using GameFramework;
|
||||
using SepCore.DataTable;
|
||||
using SepCore.Definition;
|
||||
using Entity;
|
||||
using GameFramework;
|
||||
using SepCore.Entity;
|
||||
using GameFramework.DataTable;
|
||||
using GameFramework.Sound;
|
||||
using UnityGameFramework.Runtime;
|
||||
using CustomUtility;
|
||||
using SepCore.CustomUtility;
|
||||
|
||||
namespace StarForce
|
||||
namespace SepCore.Sound
|
||||
{
|
||||
public static class SoundExtension
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using GameFramework.UI;
|
||||
using SepCore.DataTable;
|
||||
using SepCore.Definition;
|
||||
using CustomUtility;
|
||||
using SepCore.CustomUtility;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace SepCore.UI
|
||||
|
||||
Reference in New Issue
Block a user