Compare commits

...

554 Commits

Author SHA1 Message Date
ALEXTANG
abd152b072 [+] SubAssetsOperationHandle LoadSubAssetsSync(string location)
[+] SubAssetsOperationHandle LoadSubAssetsSync(string location)
2023-06-06 19:28:44 +08:00
ALEXTANG
470e62d9c4 Update ResourceModule.cs 2023-06-06 15:19:28 +08:00
ALEXTANG
481b5911ab Update ResourceManager.cs 2023-06-06 15:19:24 +08:00
ALEXTANG
05d3aff05e Update IResourceManager.cs 2023-06-06 15:19:20 +08:00
ALEXTANG
86bb6353dc Update ResourceManager.Services.cs
同步修复IOS平台流解密失败的问题。
2023-06-06 09:55:01 +08:00
ALEXTANG
334698b6e6 Update RootModule.cs 2023-06-05 19:31:32 +08:00
ALEXTANG
2684bd29f5 Update GameClient.cs 2023-06-05 14:49:26 +08:00
ALEXTANG
c568c62404 [+] Update HybridCLR v2.4.2
[+] Update HybridCLR v2.4.2
2023-06-05 12:34:27 +08:00
ALEXTANG
699ccb3b09 [+] Update YooAssets v1.4.14
[+] Update YooAssets v1.4.14
2023-06-05 12:19:24 +08:00
ALEXTANG
f92bf5c602 Update GameClient.cs 2023-05-20 12:23:45 +08:00
ALEXTANG
cd87c71281 Update MsgDispatcher.cs 2023-05-20 12:23:41 +08:00
ALEXTANG
94c137b3c6 Update ILogicSys.cs 2023-05-20 11:27:11 +08:00
ALEXTANG
120a86b396 Create Redux.cs 2023-05-20 11:25:49 +08:00
ALEXTANG
383dc50fe3 Create Redux.cs.meta 2023-05-20 11:25:46 +08:00
ALEXTANG
2369e8723c Update TSingleton.cs 2023-05-20 11:25:44 +08:00
ALEXTANG
344f3293ad Update ILogicSys.cs 2023-05-20 11:25:37 +08:00
ALEXTANG
5d361dd188 Update BehaviourSingleton.cs 2023-05-20 11:25:09 +08:00
ALEXTANG
a2f7fe907a Update BaseLogicSys.cs 2023-05-20 11:25:02 +08:00
ALEXTANG
5b3f64689f Create Attribute.cs.meta 2023-05-20 11:24:58 +08:00
ALEXTANG
2258c13892 Create Attribute.cs 2023-05-20 11:24:55 +08:00
ALEXTANG
a70d2e7d17 Update main.unity 2023-05-20 11:11:14 +08:00
ALEXTANG
b15f51631a Update Network.cs 2023-05-20 11:10:46 +08:00
ALEXTANG
da12bd7cab Update GameClient.cs 2023-05-20 11:10:41 +08:00
ALEXTANG
98bcaef6b7 Update UnitySingleton.cs 2023-05-20 11:10:39 +08:00
ALEXTANG
71d1286144 Update TSingleton.cs 2023-05-20 11:10:34 +08:00
ALEXTANG
9359a81a96 Update ProtobufUtility.cs 2023-05-20 11:01:38 +08:00
ALEXTANG
a9542646c1 Update NetworkChannelHelper.cs 2023-05-20 11:01:33 +08:00
ALEXTANG
0890ca9bdb [+] Network
[+] Network
2023-05-19 19:40:05 +08:00
ALEXTANG
ec409c7e15 Update Network
Update Network
2023-05-19 17:01:04 +08:00
ALEXTANG
4bc63fafc8 Update gen_pb_code.bat 2023-05-19 00:43:28 +08:00
ALEXTANG
fe0f9afd6d Update gen_pb_code.bat 2023-05-19 00:42:38 +08:00
ALEXTANG
4632a0c099 [+] UpdateNetwork Module
[+] UpdateNetwork Module
2023-05-19 00:31:15 +08:00
ALEXTANG
60e57bb80b Update ProtoUtil.cs 2023-05-19 00:08:23 +08:00
ALEXTANG
b7c79d0438 [+] ProtoCs
[+] ProtoCs
2023-05-19 00:08:11 +08:00
ALEXTANG
62b7c9e4d6 [+] Protobuf.dll
[+] Protobuf.dll
2023-05-19 00:07:24 +08:00
ALEXTANG
75a6977afb [+] ProtobufUtility
[+] ProtobufUtility
2023-05-19 00:06:43 +08:00
ALEXTANG
659da836ac Update GameLogic.asmdef 2023-05-19 00:05:52 +08:00
ALEXTANG
07c459051f [+] Proto
[+] Proto
2023-05-19 00:03:18 +08:00
ALEXTANG
4253a81e78 Update
Update
2023-05-19 00:02:43 +08:00
ALEXTANG
e498abacd1 Update ICSharpCode.SharpZipLib.dll.meta 2023-05-19 00:02:17 +08:00
ALEXTANG
f16759483f [+] NetProto
[+] NetProto
2023-05-17 23:07:17 +08:00
ALEXTANG
899472a5db [+] Network
[+] Network
2023-05-17 23:06:29 +08:00
ALEXTANG
e65245371a Update TEngineLogHelper.cs 2023-05-17 23:05:58 +08:00
ALEXTANG
b04fff4ec9 [+] proto 2023-05-17 21:38:44 +08:00
ALEXTANG
d8f8fd01d9 [+] proto 2023-05-17 21:38:24 +08:00
ALEXTANG
9b1c5e6f0a [+] proto
[+] proto
2023-05-17 21:38:14 +08:00
ALEXTANG
b2b5c9274c Update RuleConfig.asset 2023-05-15 14:09:38 +08:00
ALEXTANG
b814d689d8 [-] AnimationHierarchyEditorTool
[-] AnimationHierarchyEditorTool
2023-05-14 10:31:33 +08:00
ALEXTANG
ca6de42d67 Update main.unity 2023-05-13 14:56:47 +08:00
ALEXTANG
c3e9b76fd6 Update main.unity 2023-05-13 14:56:02 +08:00
ALEXTANG
dca7b71457 [+] DisStripCode 防裁剪
[+] DisStripCode 防裁剪
2023-05-13 14:55:55 +08:00
ALEXTANG
7106454dfb Update ProjectSettings.asset 2023-05-13 22:22:01 +08:00
ALEXTANG
b97e24aa6d Create BurstAotSettings_iOS.json 2023-05-13 22:21:49 +08:00
ALEXTANG
bec4cba501 Update .gitignore 2023-05-13 22:13:50 +08:00
ALEXTANG
0568d5f8b2 Update ProcedureLaunch.cs 2023-05-13 21:21:03 +08:00
ALEXTANG
49db48e7fc Update GameModule.cs 2023-05-13 21:20:42 +08:00
ALEXTANG
92fc5e0bcd Update ProcedureLaunch.cs 2023-05-13 21:12:41 +08:00
ALEXTANG
11391e597e Update AudioModule.cs 2023-05-13 21:12:36 +08:00
ALEXTANG
6b64f3b261 Update Constant.cs 2023-05-13 21:12:29 +08:00
ALEXTANG
dff6ba4e6d Update GameApp_RegisterSystem.cs 2023-05-13 20:35:36 +08:00
ALEXTANG
036c89a6d1 Update BehaviourSingleton.cs 2023-05-13 20:35:34 +08:00
ALEXTANG
fd7d8a798b Update LogUI.prefab 2023-05-13 10:22:29 +08:00
ALEXTANG
4db89019dd [+] Enable Skip Unity Logo
[+] Enable Skip Unity Logo
2023-05-12 23:41:59 +08:00
ALEXTANG
de0d4e58a5 [+] Editor Tool Bar 2023-05-12 23:28:00 +08:00
ALEXTANG
d64a7d6777 [+] PlayerPrefsEditor 2023-05-12 22:36:06 +08:00
ALEXTANG
0c32dad70b [+] LruAssetGroup
[+] LruAssetGroup
2023-05-12 22:32:17 +08:00
ALEXTANG
c44c3e8c67 [+] AssetReference
[+] AssetReference
2023-05-12 22:31:27 +08:00
ALEXTANG
dfc8b5eb8f Update README.md 2023-05-12 21:03:18 +08:00
ALEXTANG
80f004c942 Create BurstAotSettings_StandaloneLinux64.json 2023-05-12 14:09:43 +08:00
ALEXTANG
da11c0915f Update Utility.DevicePerformance.cs 2023-05-12 14:09:37 +08:00
ALEXTANG
fdc526cfca [+] 编辑器拓展资源运行模式
[+] 编辑器拓展资源运行模式
2023-05-12 12:24:19 +08:00
ALEXTANG
73b3ae6527 [+] ToolbarExt
[+] ToolbarExt
2023-05-12 10:56:45 +08:00
ALEXTANG
0ce268aaf6 AssetRefrenceEditor
AssetRefrenceEditor
2023-05-12 00:35:36 +08:00
ALEXTANG
c7ff2de374 Update ScriptGenerator.cs 2023-05-12 00:35:16 +08:00
ALEXTANG
050003bd7b Update TEngineGlobalSettings.asset 2023-05-12 00:35:13 +08:00
ALEXTANG
43c49aabbb Update SettingsUtils.cs 2023-05-12 00:34:41 +08:00
ALEXTANG
29985b819e Update FrameworkGlobalSettings.cs 2023-05-12 00:34:38 +08:00
ALEXTANG
5a07650f73 Update SceneSwitcher.cs 2023-05-12 00:32:04 +08:00
ALEXTANG
fd199e344a [+] SerializableDictionary
[+] SerializableDictionary
2023-05-12 00:27:05 +08:00
ALEXTANG
a827e501f2 [+] EditorToolbar
[+] EditorToolbar
2023-05-11 23:52:42 +08:00
ALEXTANG
35f7c9309c Update UIWidget.cs 2023-05-11 23:42:21 +08:00
ALEXTANG
d8149dc743 Update UIWidget.cs 2023-05-11 23:23:08 +08:00
ALEXTANG
ec357fa5fb Update AssetReference.cs 2023-05-11 23:22:00 +08:00
ALEXTANG
1c2dec1381 [+] Srienix
[+] Srienix
2023-05-11 22:40:44 +08:00
ALEXTANG
30ad711907 Update UIButtonScale.cs 2023-05-11 20:04:51 +08:00
ALEXTANG
3be06cac21 [+] UIExtension UIButtonScale
[+] UIExtension UIButtonScale
2023-05-11 19:52:53 +08:00
ALEXTANG
22ead28974 Update ScriptGenerator.cs 2023-05-11 19:11:21 +08:00
ALEXTANG
c40391a65b Update AssetReference.cs 2023-05-11 19:11:19 +08:00
ALEXTANG
5c7223213b [+] UI AssetRefrence
[+] UI AssetRefrence
2023-05-11 00:25:26 +08:00
ALEXTANG
699930f6e8 [+] AssetRefrence
[+] AssetRefrence
2023-05-11 00:25:00 +08:00
ALEXTANG
026a1f458c [+] AssetReference 自动引用计数
[+] AssetReference 自动引用计数
2023-05-10 22:45:31 +08:00
ALEXTANG
6fddedf0b2 Update Odin meta
Update Odin meta
2023-05-10 21:53:05 +08:00
ALEXTANG
e88d54e63f Update RuleConfig.asset 2023-05-10 21:49:32 +08:00
ALEXTANG
6a04371045 Update main.unity 2023-05-10 16:30:25 +08:00
ALEXTANG
0f51878471 [+] Odin
[+] Odin
2023-05-10 16:20:22 +08:00
ALEXTANG
8cab13da79 [+] UIGaussianBlurLayer
[+] UIGaussianBlurLayer
2023-05-10 16:04:51 +08:00
ALEXTANG
9c110e23a6 [+] TShader & ActorShaderMgr
[+] TShader & ActorShaderMgr
2023-05-10 15:45:40 +08:00
ALEXTANG
1ee6dc2611 Update UILoadUpdate.cs 2023-05-10 14:07:08 +08:00
ALEXTANG
a602633c9b Update UILoadTip.prefab 2023-05-10 11:05:54 +08:00
ALEXTANG
f32d42db62 [+] EditorResourceBuilder
[+] EditorResourceBuilder
2023-05-10 00:16:23 +08:00
ALEXTANG
eac9d4a68e Update UILoadTip.prefab 2023-05-09 23:15:04 +08:00
ALEXTANG
e7c2fb6938 Update UILoadUpdate.prefab 2023-05-09 23:15:00 +08:00
ALEXTANG
4b7fed2745 Update LoadText.cs 2023-05-09 23:14:57 +08:00
ALEXTANG
02c3055e11 Update SafeTop.cs 2023-05-09 23:14:49 +08:00
ALEXTANG
2f76cc012c Update ProcedureCreateDownloader.cs 2023-05-09 21:02:55 +08:00
ALEXTANG
9016dd9e61 Update 2023-05-09 21:02:24 +08:00
ALEXTANG
878a05b614 UpdateData
UpdateData
2023-05-09 20:56:33 +08:00
ALEXTANG
25e2617782 [+] UpdateData.json
[+] UpdateData.json
2023-05-09 20:54:02 +08:00
ALEXTANG
de1558680c [+] Update LoadData
[+] Update LoadData
2023-05-09 20:47:51 +08:00
ALEXTANG
079ff980a3 [=]SafeTop ImageBackGround
[=]SafeTop ImageBackGround
2023-05-09 14:34:14 +08:00
ALEXTANG
edc83c8989 Update EditorUserSettings.asset 2023-05-09 00:17:38 +08:00
ALEXTANG
80c4676430 [+] Dotween Pro
[+] Dotween Pro
2023-05-09 00:17:11 +08:00
ALEXTANG
53ffc64699 Revert "[+] Import Dotween Free Version"
This reverts commit c072b82239.
2023-05-09 00:06:03 +08:00
ALEXTANG
c072b82239 [+] Import Dotween Free Version
[+] Import Dotween Free Version
2023-05-08 23:30:06 +08:00
ALEXTANG
598f1ef36b Update ProjectSettings.asset 2023-05-07 14:23:20 +08:00
ALEXTANG
991dddfdae Update packages-lock.json 2023-05-07 14:23:02 +08:00
ALEXTANG
11fe2a8d18 Update manifest.json 2023-05-07 14:22:58 +08:00
ALEXTANG
1992f4cda4 Update GameApp.cs 2023-05-07 12:21:59 +08:00
ALEXTANG
5fb16b442e ResourceModule UpdateMainfest Info and Save operation.SavePackageVersion();
ResourceModule UpdateMainfest Info and Save operation.SavePackageVersion();
2023-05-07 12:20:29 +08:00
ALEXTANG
ece41a730e Update UILoadUpdate.prefab 2023-05-07 11:18:25 +08:00
ALEXTANG
12105f649a UILoadTip
UILoadTip
2023-05-07 11:16:27 +08:00
ALEXTANG
fd728d037c ProcedureClearCache
ProcedureClearCache
2023-05-07 11:06:28 +08:00
ALEXTANG
23ee21162f Enable Mono Build
Enable Mono Build
2023-05-07 10:40:09 +08:00
ALEXTANG
4634de28d7 Create BurstAotSettings_Android.json 2023-05-06 19:52:57 +08:00
ALEXTANG
ef507c383d Update Android-RunSuccessed.png 2023-05-06 19:52:46 +08:00
ALEXTANG
9423fdc193 Update Resource Update HostServer
Update Resource Update HostServer
2023-05-06 14:22:00 +08:00
ALEXTANG
c7b25e4781 Merge branch 'TEngine_v_3.0.0' 2023-05-06 13:18:40 +08:00
ALEXTANG
2ec2546230 Update EditorUserSettings.asset 2023-05-06 13:15:20 +08:00
ALEXTANG
0815a30f83 Update TimelineSettings.asset 2023-05-06 13:15:14 +08:00
ALEXTANG
27549f11b2 Update HybridCLRSettings.asset 2023-05-06 13:15:07 +08:00
ALEXTANG
713661417b Update UILoadUpdate.prefab 2023-05-06 13:15:04 +08:00
ALEXTANG
906ec80904 Update .gitignore 2023-05-06 11:39:16 +08:00
ALEXTANG
455c700953 Update .gitignore 2023-05-06 11:22:57 +08:00
ALEXTANG
007b136724 [+] ConfigUtility
[+] ConfigUtility
2023-05-05 23:23:13 +08:00
ALEXTANG
6aaec0599b Update ScriptGenerator.cs 2023-05-05 23:13:51 +08:00
ALEXTANG
8549179a43 Update GameLogic.asmdef 2023-05-05 23:13:40 +08:00
ALEXTANG
7b239ee4da [+] 升级至2021.3.20f1c1
[+] 2020.3.33f1c2升级至2021.3.20f1c1
2023-05-05 23:09:17 +08:00
ALEXTANG
f32159f19c Update main.unity 2023-05-05 23:08:05 +08:00
ALEXTANG
3196cf3b5e Update .gitignore 2023-05-05 23:07:58 +08:00
ALEXTANG
b59139b94a 程序集调整
程序集调整
2023-05-05 23:07:51 +08:00
ALEXTANG
2a15db0690 Update AnimationHierarchyEditorTool.cs 2023-05-05 22:50:59 +08:00
ALEXTANG
f3691e2145 [+] NetProto
[+] NetProto
2023-05-05 22:38:50 +08:00
ALEXTANG
da39314f34 [+] ByteHelper
[+] ByteHelper
2023-05-04 13:23:55 +08:00
ALEXTANG
6ea42a28cd Update AnimationHierarchyEditorTool.cs 2023-05-04 13:23:21 +08:00
ALEXTANG
cd99f15374 Revert "[-] Remove Thirdly of Animation"
This reverts commit cb2b9331cf.
2023-05-04 10:47:49 +08:00
ALEXTANG
0e43421606 [+] BaseLogicSys
[+] BaseLogicSys
2023-05-03 21:36:35 +08:00
ALEXTANG
64e39673d3 ENABLE_URP asmdef
ENABLE_URP asmdef
2023-05-03 12:23:00 +08:00
ALEXTANG
d839808bce Merge pull request #37 from ALEXTANGXIAO/TEngine_v_3.0.0
Adjust asmdef
2023-05-03 12:16:18 +08:00
ALEXTANG
2e1bbee994 Delete GameMain.asmdef.meta 2023-05-03 12:14:06 +08:00
ALEXTANG
373a06bfd5 Delete GameMain.asmdef 2023-05-03 12:14:02 +08:00
ALEXTANG
4996dba84a Update HybridCLRSettings.asset 2023-05-03 12:01:50 +08:00
ALEXTANG
95afaa2a4d Update TEngineGlobalSettings.asset 2023-05-03 12:01:47 +08:00
ALEXTANG
d204675bd6 Delete UIGroup.meta 2023-05-03 11:59:30 +08:00
ALEXTANG
9e4a2b34da Merge pull request #36 from ALEXTANGXIAO/TEngine_v_3.0.0
[+] Update Procedure Path And asmdef
2023-04-26 13:31:23 +08:00
ALEXTANG
d3272e1bb1 [+] Update Procedure Path And asmdef
[+] Update Procedure Path And asmdef
2023-04-26 13:30:23 +08:00
ALEXTANG
7db0d3fcc4 [+] ZipWrapper
[+] ZipWrapper
2023-04-25 15:44:29 +08:00
ALEXTANG
293ea2e128 Update start.bat 2023-04-25 15:44:19 +08:00
ALEXTANG
9f187109a5 Merge pull request #35 from ALEXTANGXIAO/TEngine_v_3.0.0
[+] FileServer
2023-04-25 15:18:19 +08:00
ALEXTANG
1c0a570d74 [+] FileServer
[+] FileServer
2023-04-25 15:12:28 +08:00
ALEXTANG
621a315eec Merge pull request #34 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0 HybridCLR RunAble
2023-04-25 14:13:05 +08:00
ALEXTANG
4db58f507d Update 0-RunAble.md 2023-04-25 14:11:53 +08:00
ALEXTANG
89b5bc21ee Create Android-RunSuccessed.png 2023-04-25 14:11:49 +08:00
ALEXTANG
6320e75e7c Update 0-RunAble.md 2023-04-25 13:48:35 +08:00
ALEXTANG
02d4e6686c Create Win64-RunSuccessed.png 2023-04-25 13:48:32 +08:00
ALEXTANG
0c564f8571 Update EditorUserSettings.asset 2023-04-25 13:46:22 +08:00
ALEXTANG
c4c345c5f7 Update ProjectSettings.asset 2023-04-25 13:46:15 +08:00
ALEXTANG
bf1d71d0f9 Update HybridCLRSettings.asset 2023-04-25 13:46:11 +08:00
ALEXTANG
9f6f314ac9 Update HybridCLRCustomGlobalSettings.cs 2023-04-25 13:46:01 +08:00
ALEXTANG
a8588114b0 Update DefaultSettingHelper.cs 2023-04-25 13:45:55 +08:00
ALEXTANG
4d35e61614 Update TEngineGlobalSettings.asset 2023-04-25 13:45:40 +08:00
ALEXTANG
03e58b921f Update AudioModule.cs 2023-04-25 13:45:33 +08:00
ALEXTANG
3228aed4db Update AssetBundleBuilderSetting.asset 2023-04-25 13:44:14 +08:00
ALEXTANG
aa3cf05f4a [+] HotUpdateProcedure
[+] HotUpdateProcedure
2023-04-25 13:44:01 +08:00
ALEXTANG
d1fdedaaac Update ProcedureLoadAssembly.cs 2023-04-25 11:32:33 +08:00
ALEXTANG
b79fe23229 Update packages-lock.json 2023-04-25 11:25:59 +08:00
ALEXTANG
2de3fd2a1d Update manifest.json 2023-04-25 11:25:53 +08:00
ALEXTANG
1328f71c9e Merge pull request #33 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-25 00:43:41 +08:00
ALEXTANG
ab532c73d7 Update EditorExtUtil.cs 2023-04-25 00:42:32 +08:00
ALEXTANG
3f67b27e45 [+] EditorExtUtil 2023-04-25 00:33:32 +08:00
ALEXTANG
a285a635b9 [+] EditorExtUtil
[+] EditorExtUtil
2023-04-25 00:32:21 +08:00
ALEXTANG
08c2ff4dcc [+] BattleCore
[+] BattleCore
2023-04-25 00:23:42 +08:00
ALEXTANG
e0b42d3dbe [+] Utility.Bit
[+] Utility.Bit
2023-04-25 00:16:55 +08:00
ALEXTANG
688b76b745 [+] Extension
[+] Extension
2023-04-25 00:16:40 +08:00
ALEXTANG
8f972f9340 Update Extension 2023-04-25 00:14:17 +08:00
ALEXTANG
ac25925406 [+] Extension
[+] Extension
2023-04-25 00:12:57 +08:00
ALEXTANG
a5f0c395f0 [+] Books
[+] Books
2023-04-25 00:08:18 +08:00
ALEXTANG
4bdea1d7ce Merge pull request #32 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0     [+]HybridCLR
2023-04-25 00:03:50 +08:00
ALEXTANG
4c46af709a Create Editor-RunSuccessed.png 2023-04-25 00:02:34 +08:00
ALEXTANG
8531332df1 Update HybridCLRCustomGlobalSettings.cs 2023-04-25 00:01:31 +08:00
ALEXTANG
db619e6b6b Update TEngineGlobalSettings.asset 2023-04-25 00:01:23 +08:00
ALEXTANG
f628380347 Update TEngine.Editor.asmdef 2023-04-25 00:01:20 +08:00
ALEXTANG
71cf223426 Update BuildAssetsCommand.cs 2023-04-25 00:01:16 +08:00
ALEXTANG
e9ecdf2d16 Update ProcedureLoadAssembly.cs 2023-04-25 00:00:59 +08:00
ALEXTANG
506f2835be Update ProcedureLoadAssembly.cs 2023-04-24 23:31:18 +08:00
ALEXTANG
90c22db2d2 Update ProcedureLoadAssembly.cs 2023-04-24 23:29:34 +08:00
ALEXTANG
72ffc58030 Update HybridCLRSettings.asset 2023-04-24 23:12:55 +08:00
ALEXTANG
f3663947cf Update .gitignore 2023-04-24 23:12:50 +08:00
ALEXTANG
d5eced7471 Update ProjectSettings.asset 2023-04-24 23:02:03 +08:00
ALEXTANG
6b8d88fe67 [+] HybridCLR newAble
[+] HybridCLR newAble
2023-04-24 22:56:48 +08:00
ALEXTANG
b50ef83c4f [+] BattleCore Empty
[+] BattleCore Empty
2023-04-24 22:50:37 +08:00
ALEXTANG
8b03807dae Update ProjectSettings.asset 2023-04-23 23:20:44 +08:00
ALEXTANG
3e67aeb455 Update ProtoBase.cs 2023-04-23 23:19:08 +08:00
ALEXTANG
2a1217558a Update ProtoBase.cs 2023-04-23 23:19:06 +08:00
ALEXTANG
1957e30210 Update ProjectSettings.asset 2023-04-23 19:20:12 +08:00
ALEXTANG
77af3ac457 Update ProtoGenTools.cs 2023-04-23 15:54:20 +08:00
ALEXTANG
c9016bf72e [+] UpdateProtoGenTools
[+] UpdateProtoGenTools
2023-04-23 14:32:20 +08:00
ALEXTANG
c4df46eb57 [-][+] Change .proto
[-][+] Change .proto
2023-04-23 14:29:19 +08:00
ALEXTANG
0dd2716c8e ProtoBase
ProtoBase
2023-04-23 14:27:48 +08:00
ALEXTANG
17c4b9a05f [+] ProtoGenTools
[+] ProtoGenTools
2023-04-23 14:27:34 +08:00
ALEXTANG
18770e55d5 [+] ProtoGenTools
[+] ProtoGenTools
2023-04-23 14:25:30 +08:00
ALEXTANG
30f425ada2 ProtoGenTools
ProtoGenTools
2023-04-23 14:22:44 +08:00
ALEXTANG
977eeb6fef Update BuglyAgent.cs
#pragma warning disable CS0414
2023-04-23 11:44:35 +08:00
ALEXTANG
cdc9d5c99d [-] UIGroup
[-] UIGroup
2023-04-22 15:57:47 +08:00
ALEXTANG
31d9834387 Merge pull request #31 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-22 00:47:50 +08:00
ALEXTANG
a31646a2ec [+] 基于UniTask的Kcp实现
[+] 基于UniTask的Kcp实现
2023-04-22 00:44:10 +08:00
ALEXTANG
cb2b9331cf [-] Remove Thirdly of Animation
[-] Remove Thirdly of Animation because of it`s bad for editor
2023-04-21 23:59:44 +08:00
ALEXTANG
2caa6e686e [+] NetworkChannelUdp & Todo NetworkChannelKcp
[+] NetworkChannelUdp & Todo NetworkChannelKcp
2023-04-21 23:49:59 +08:00
ALEXTANG
54c545b1eb [+] Thirdly AnimationTools
[+] Thirdly AnimationTools
2023-04-21 23:36:51 +08:00
ALEXTANG
f8f9d999a8 Merge pull request #30 from ALEXTANGXIAO/TEngine_v_3.0.0
Update ProjectSettings.asset
2023-04-21 22:57:57 +08:00
ALEXTANG
57ddbdb20b Update ProjectSettings.asset 2023-04-21 14:07:01 +08:00
ALEXTANG
786c2b319c Merge pull request #29 from ALEXTANGXIAO/TEngine_v_3.0.0
T engine v 3.0.0
2023-04-21 14:05:26 +08:00
ALEXTANG
6ba385d59e Update UIExtension.cs 2023-04-21 14:03:23 +08:00
ALEXTANG
ef8fe7f3a0 Update .gitignore 2023-04-21 14:03:18 +08:00
ALEXTANG
b9b132d778 Update ProjectSettings.asset 2023-04-21 14:00:04 +08:00
ALEXTANG
663c1342f7 [+] Implementation SendAndRegister
[+] Implementation SendAndRegister
2023-04-21 13:41:28 +08:00
ALEXTANG
b791c1a44d Update NetworkChannelHelper.cs 2023-04-21 13:26:49 +08:00
ALEXTANG
14abeb2427 Update TEngineLogHelper.cs 2023-04-21 13:26:40 +08:00
ALEXTANG
508607a87b [Fix] GameEvent
[Fix] GameEvent
2023-04-21 11:46:00 +08:00
ALEXTANG
ec8fb24256 [+] Network Module
[+] Network Module
2023-04-21 11:39:51 +08:00
ALEXTANG
cc5654b9ed [+] UI ErrorLog
[+] UI ErrorLog
2023-04-21 10:55:12 +08:00
ALEXTANG
f1c8a91660 [+] Network Module
[+] Network Module
2023-04-21 10:50:04 +08:00
ALEXTANG
2fcd02d69e [=] GameTickWatcher
[=] GameTickWatcher
2023-04-21 10:37:01 +08:00
ALEXTANG
4f908d46af [+] Network Module
[+] Network Module
2023-04-21 10:29:42 +08:00
ALEXTANG
91fff462cb [+] Network
[+] Network
2023-04-20 20:23:00 +08:00
ALEXTANG
7c0d24cd2d Merge pull request #28 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-20 20:17:47 +08:00
ALEXTANG
ec25b314e0 [+] Utility.DevicePerformance
[+] Utility.DevicePerformance
2023-04-20 19:40:25 +08:00
ALEXTANG
c850ec359c [+] SingletonSystem
[+] SingletonSystem
2023-04-20 19:34:37 +08:00
ALEXTANG
ec17437782 [+] Loom
[+] Loom
2023-04-20 19:34:13 +08:00
ALEXTANG
069c5b93e0 [+] GameTickWacher
[+] GameTickWacher
2023-04-20 19:34:01 +08:00
ALEXTANG
385d789c96 Create GameTickWatcher.meta 2023-04-20 19:33:35 +08:00
ALEXTANG
db5985a236 Merge pull request #27 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-20 17:57:18 +08:00
ALEXTANG
05a589e958 [+] Repleace LubanLib => LubanLib.dll
[+] Repleace LubanLib => LubanLib.dll
2023-04-20 17:55:45 +08:00
ALEXTANG
65a0323e6e Update EditorBuildSettings.asset 2023-04-19 22:42:28 +08:00
ALEXTANG
e1afc4bd67 Merge pull request #25 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-19 17:58:19 +08:00
ALEXTANG
d5826551b4 Bugly
Bugly
2023-04-19 17:49:29 +08:00
ALEXTANG
4db704930d Bugly
Bugly
2023-04-19 17:45:25 +08:00
ALEXTANG
4c78b70293 Update main.unity 2023-04-19 17:09:14 +08:00
ALEXTANG
c4a6efc1ca [+] LocalizationModule
[+] LocalizationModule
2023-04-19 17:09:07 +08:00
ALEXTANG
6192b99bb1 Update RootModuleInspector.cs 2023-04-19 16:04:26 +08:00
ALEXTANG
d8ff81d61f Update GameApp_RegisterSystem.cs 2023-04-19 15:42:56 +08:00
ALEXTANG
366ff5c127 Update GameApp.cs 2023-04-19 15:42:51 +08:00
ALEXTANG
b4afdb112a Update Singleton.cs 2023-04-19 15:41:55 +08:00
ALEXTANG
2f194bbb4a Update LogUI.cs 2023-04-19 15:34:57 +08:00
ALEXTANG
a6f3514665 Merge pull request #24 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-19 15:28:09 +08:00
ALEXTANG
6cccf0b80f Update main.unity 2023-04-19 15:27:35 +08:00
ALEXTANG
8b1880b4fb Update main.unity 2023-04-19 15:27:17 +08:00
ALEXTANG
979a2039cf Update main.unity 2023-04-19 15:26:36 +08:00
ALEXTANG
323d05c53f Update ScriptGenerator.cs 2023-04-19 15:26:17 +08:00
ALEXTANG
218348a836 Merge pull request #23 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-19 14:21:07 +08:00
ALEXTANG
611f1ffab9 Update GameFrameworkEntry.cs 2023-04-19 14:20:05 +08:00
ALEXTANG
3c908a7955 Update PackageManagerSettings.asset 2023-04-19 14:14:13 +08:00
ALEXTANG
f8365525cb Update packages-lock.json 2023-04-19 14:14:07 +08:00
ALEXTANG
7cabdfeb7b Update manifest.json 2023-04-19 14:14:02 +08:00
ALEXTANG
529dc232ee Create TimerManager.cs.meta 2023-04-19 14:13:39 +08:00
ALEXTANG
76d9e82d69 Create TimerModule.cs.meta 2023-04-19 14:13:33 +08:00
ALEXTANG
112aba9aca Timer
Timer
2023-04-18 20:58:53 +08:00
ALEXTANG
744fcdee22 Update UIExtension.cs 2023-04-18 20:50:22 +08:00
ALEXTANG
7eaa932984 Merge pull request #22 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-18 20:03:29 +08:00
ALEXTANG
db2ee2cd77 Update TEngineLogHelper.cs 2023-04-18 19:31:41 +08:00
ALEXTANG
46804603b7 Update GameLogic.asmdef 2023-04-18 17:08:49 +08:00
ALEXTANG
14356bbaf0 Update TEngineLogHelper.cs 2023-04-18 17:07:50 +08:00
ALEXTANG
7cb4d9ecf9 Update SafeTop.cs 2023-04-18 17:07:18 +08:00
ALEXTANG
be0fd4de1b Update ImageBackGroundStretch.cs 2023-04-18 17:07:14 +08:00
ALEXTANG
033cd12bc8 ErrorLogger
ErrorLogger
2023-04-18 17:07:11 +08:00
ALEXTANG
c98cef4e1e Create LogUI.prefab.meta 2023-04-18 17:06:50 +08:00
ALEXTANG
52f8a4f03f Create LogUI.prefab 2023-04-18 17:06:46 +08:00
ALEXTANG
264626c7dd Merge pull request #21 from ALEXTANGXIAO/TEngine_v_3.0.0
T engine v 3.0.0
2023-04-17 19:06:48 +08:00
ALEXTANG
2d52b1683b Create Editor.meta 2023-04-17 19:05:27 +08:00
ALEXTANG
33264e6526 Update ResourceManager.cs 2023-04-17 18:48:36 +08:00
ALEXTANG
2800f42acd Update FrameworkGlobalSettings.cs 2023-04-17 18:48:31 +08:00
ALEXTANG
9f271036fd Update EditorUserSettings.asset 2023-04-13 16:29:42 +08:00
ALEXTANG
3c02e1bc2a Update EditorBuildSettings.asset 2023-04-13 16:29:36 +08:00
ALEXTANG
1a0cd4b68d Merge pull request #20 from ALEXTANGXIAO/TEngine_v_3.0.0
TEngine v 3.0.0
2023-04-13 16:17:34 +08:00
ALEXTANG
9d6225b71b Create Atlas.meta 2023-04-13 16:13:19 +08:00
ALEXTANG
6f22fb2177 Create SpritePostprocessor.cs.meta 2023-04-13 16:11:18 +08:00
ALEXTANG
8061a124f3 Create SpritePostprocessor.cs 2023-04-13 16:11:15 +08:00
ALEXTANG
20f7451766 Update TEngineGlobalSettings.asset 2023-04-13 16:11:10 +08:00
ALEXTANG
fa634c47f9 [+] UIRaw
[+] UIRaw
2023-04-13 15:56:35 +08:00
ALEXTANG
4953a46118 Update UIExtension.cs 2023-04-13 15:37:46 +08:00
ALEXTANG
fe69c18b4e [+] UIExtension
[+] UIExtension
2023-04-13 15:35:54 +08:00
ALEXTANG
7a80f79b16 Update UILoadMgr.cs 2023-04-13 14:52:32 +08:00
ALEXTANG
3744860ef6 [+] ResourceModule 2023-04-13 14:50:27 +08:00
ALEXTANG
8d1078cb91 [+] Module
[+] Module
2023-04-13 14:50:16 +08:00
ALEXTANG
1766500f7c Update BuildAssetsCommand.cs 2023-04-13 14:38:00 +08:00
ALEXTANG
51254bba57 [+] Procedure
[+] Procedure
2023-04-13 14:37:49 +08:00
ALEXTANG
a6958f39e7 Update Fsm.cs 2023-04-13 14:36:13 +08:00
ALEXTANG
7bc055dd00 Update ProjectSettings.asset 2023-04-13 14:34:01 +08:00
ALEXTANG
71816b04c7 Update ResourceModule.cs 2023-04-13 14:33:49 +08:00
ALEXTANG
b5d76e1f22 Update DownloaderOperation.cs 2023-04-13 11:48:34 +08:00
ALEXTANG
74ae3fb349 Launcher
Launcher
2023-04-12 17:43:38 +08:00
ALEXTANG
402a35bfc2 Extension 2023-04-12 17:40:39 +08:00
ALEXTANG
52f7e1bd60 Update GameApp_RegisterSystem.cs 2023-04-12 15:06:55 +08:00
ALEXTANG
75594e3680 Update GameApp.cs 2023-04-12 15:06:50 +08:00
ALEXTANG
21d2a96d51 GameProto
GameProto
2023-04-11 20:19:20 +08:00
ALEXTANG
9d70c9d3fd Update gen_code_json.bat 2023-04-11 20:11:11 +08:00
ALEXTANG
df97407c5f Update GameModule.cs 2023-04-11 20:00:02 +08:00
ALEXTANG
a1f1af1b86 Update TProfiler.cs 2023-04-11 19:58:43 +08:00
ALEXTANG
6e0785623d GameScripts
GameScripts
2023-04-11 19:58:38 +08:00
ALEXTANG
4e2b3756c9 Update TEngineGlobalSettings.asset 2023-04-11 17:37:22 +08:00
ALEXTANG
9ac5c4e172 Update main.unity 2023-04-11 17:37:18 +08:00
ALEXTANG
5dc6243d56 SettingsMenu
SettingsMenu
2023-04-11 17:28:43 +08:00
ALEXTANG
00ba79baf0 Update WindowAttribute.cs 2023-04-11 16:58:11 +08:00
ALEXTANG
8da93ff447 Update UIModule.cs 2023-04-11 16:58:03 +08:00
ALEXTANG
c99500f723 Update WindowAttribute.cs 2023-04-11 16:56:57 +08:00
ALEXTANG
280bca87fb Update UIModule.cs 2023-04-11 16:43:17 +08:00
ALEXTANG
50a6181718 UIModule
UIModule
2023-04-11 16:35:48 +08:00
ALEXTANG
749ae956d3 Update UIWidget.cs 2023-04-11 15:17:39 +08:00
ALEXTANG
2e0d7731b9 Update UIWindow.cs 2023-04-11 14:23:51 +08:00
ALEXTANG
db25782920 Update ScriptGenerator.cs 2023-04-11 14:13:09 +08:00
ALEXTANG
c1e543d3d9 Update AssetOperationHandle.cs 2023-04-11 11:28:43 +08:00
ALEXTANG
30ab1fbbff Update ResourceManager.cs 2023-04-11 11:17:52 +08:00
ALEXTANG
687e767e02 Update ResourceModule.cs 2023-04-11 11:12:17 +08:00
ALEXTANG
aa694767af Update ResourceModule.cs 2023-04-11 11:08:19 +08:00
ALEXTANG
5a663298a6 Update AssetGroup.cs 2023-04-11 11:08:13 +08:00
ALEXTANG
0d27f784f4 Update IUIBehaviour.cs 2023-04-11 10:38:01 +08:00
ALEXTANG
3ccc030cba Update UIModule.cs 2023-04-11 10:37:59 +08:00
ALEXTANG
406d71ab2b Update GameModule.cs 2023-04-10 21:01:53 +08:00
ALEXTANG
bd68a143c5 UIModule 2023-04-10 21:01:45 +08:00
ALEXTANG
51b2eaf6b4 TProfile
TProfile
2023-04-10 20:40:19 +08:00
ALEXTANG
7d9c5eac69 Delete Resource.cs.meta 2023-04-10 19:07:58 +08:00
ALEXTANG
063c96b3f0 Delete Resource.cs 2023-04-10 19:07:55 +08:00
ALEXTANG
447a0532d2 protobuf-net
protobuf-net
2023-04-10 17:41:46 +08:00
ALEXTANG
1c8b3c1081 newtonsoft-json
newtonsoft-json
2023-04-10 17:41:32 +08:00
ALEXTANG
86615c3a8c Update AudioAgent.cs 2023-04-10 17:38:48 +08:00
ALEXTANG
b2068655aa Update QueueNode.cs 2023-04-10 17:38:34 +08:00
ALEXTANG
48724e4bde Update ArcCacheTable.cs 2023-04-10 17:38:24 +08:00
ALEXTANG
3809da762c 缓存替换策略(Cache Replacement Policy)- ARC(Adaptive Replacement Cache)。
缓存替换策略(Cache Replacement Policy)- ARC(Adaptive Replacement Cache)。
2023-04-07 18:02:33 +08:00
ALEXTANG
af825a860e Remove AssetTag
Remove AssetTag
2023-04-07 16:05:44 +08:00
ALEXTANG
3366a692ed Update gen_code_bin.bat 2023-04-07 16:05:18 +08:00
ALEXTANG
4519a3bad0 AudioModule
AudioModule
2023-04-06 20:32:55 +08:00
ALEXTANG
3ad9323e9b Update AssetBundleBuilderSetting.asset 2023-04-06 19:06:34 +08:00
ALEXTANG
ecfde4d3a8 Update AssetGroup.cs 2023-04-06 18:01:20 +08:00
ALEXTANG
1660c53035 UI
UI
2023-04-06 18:01:16 +08:00
ALEXTANG
04a646d330 Update AssetGroup.cs 2023-04-06 17:32:35 +08:00
ALEXTANG
9375c0acec Update AudioCategory.cs 2023-04-06 17:10:41 +08:00
ALEXTANG
8adeb50f31 Update GameModule.cs 2023-04-06 16:56:49 +08:00
ALEXTANG
714d6ffc56 声效模块 2023-04-06 16:36:55 +08:00
ALEXTANG
6014793f75 AssetGroup
AssetGroup
2023-04-06 13:40:03 +08:00
ALEXTANG
1bda5c7d8e Commit AudioMixer
Commit AudioMixer
2023-04-05 21:57:36 +08:00
ALEXTANG
d058043ac6 Update main.unity 2023-04-05 17:31:07 +08:00
ALEXTANG
ba7b635bd1 流程管理模块
流程管理模块
2023-04-05 11:06:06 +08:00
ALEXTANG
ee9fb75407 Update ResourceModule.cs 2023-04-05 10:52:40 +08:00
ALEXTANG
aa09ecd176 Update ResourceModule.cs 2023-04-05 10:44:03 +08:00
ALEXTANG
2dd29a1328 Update ResourceModule.cs 2023-04-04 16:23:39 +08:00
ALEXTANG
5d83df6b29 ResourceModule
ResourceModule
2023-04-04 16:04:55 +08:00
ALEXTANG
774b48849c ResourceModule
ResourceModule
2023-04-04 14:50:45 +08:00
ALEXTANG
a8ebc5dd31 模块 2023-04-04 13:00:31 +08:00
ALEXTANG
08e28edacc Update main.unity 2023-04-04 12:56:31 +08:00
ALEXTANG
fd2bc3e2b1 GameModule
GameModule
2023-04-04 12:56:17 +08:00
ALEXTANG
8b164173ac GameModules
GameModules
2023-04-04 12:48:54 +08:00
ALEXTANG
890723d4c9 RootModule
RootModule
2023-04-04 11:56:13 +08:00
ALEXTANG
a6069af417 Update GameModule.cs 2023-04-04 11:54:54 +08:00
ALEXTANG
9b041b2dc7 UIModule
UIModule
2023-04-04 11:51:33 +08:00
ALEXTANG
41a0243d91 Update
Update
2023-04-04 11:32:21 +08:00
ALEXTANG
6fbe17d7d5 UIWindow 2023-04-03 20:57:10 +08:00
ALEXTANG
3f22fb72ee Update WindowAttribute.cs 2023-04-03 20:43:15 +08:00
ALEXTANG
aa6455f23e Update GameModule
Update GameModule
2023-04-03 20:42:54 +08:00
ALEXTANG
3d13d5c8e5 Update main.unity 2023-04-03 20:42:35 +08:00
ALEXTANG
469a6287cf Update .gitignore 2023-04-03 20:42:25 +08:00
ALEXTANG
7ef52245ac UIComponent
UIComponent
2023-04-03 18:54:48 +08:00
ALEXTANG
99ff4a443f Update RootComponent.cs 2023-04-03 15:46:30 +08:00
ALEXTANG
cbf145c5cd Update GameTime.cs 2023-04-03 15:46:27 +08:00
ALEXTANG
12712870d6 Update FsmComponent.cs 2023-04-03 15:46:24 +08:00
ALEXTANG
2c1b9a8743 Update main.unity 2023-04-03 15:46:20 +08:00
ALEXTANG
0b4f17d2c8 RootComponent
RootComponent
2023-04-03 14:52:11 +08:00
ALEXTANG
505354f82d Version
Version
2023-04-03 14:51:46 +08:00
ALEXTANG
eb153270a1 Update main.unity 2023-04-03 14:50:28 +08:00
ALEXTANG
b0559ec6be FsmComponent
FsmComponent
2023-04-03 14:49:38 +08:00
ALEXTANG
0dca33f123 Create Encryption.cs.meta 2023-04-03 14:42:55 +08:00
ALEXTANG
b0e33b3c3a Create Encryption.cs 2023-04-03 14:42:51 +08:00
ALEXTANG
0c401e4713 GameEvent
GameEvent
2023-04-03 14:35:24 +08:00
ALEXTANG
8d547ee4de Update RootComponent.cs 2023-04-03 14:10:09 +08:00
ALEXTANG
2a91275eea Update ResourceComponent.cs 2023-04-03 14:09:33 +08:00
ALEXTANG
172b0d55e8 Update main.unity 2023-04-03 14:07:26 +08:00
ALEXTANG
212f4192ac Update
Update
2023-04-03 14:05:14 +08:00
ALEXTANG
db425ff58a RootComponent 2023-04-03 10:38:32 +08:00
ALEXTANG
aeed0f9230 Update BaseComponent.cs 2023-04-03 10:00:29 +08:00
ALEXTANG
5e86bc279e Update ResourceManager.cs 2023-04-01 23:24:47 +08:00
ALEXTANG
933785205d ResourceModule
ResourceModule
2023-04-01 23:13:04 +08:00
ALEXTANG
f571605b9a Update 2023-04-01 17:40:10 +08:00
ALEXTANG
aeb1ff29f3 Update
Update
2023-04-01 17:22:44 +08:00
ALEXTANG
2213588713 GameFrameworkBase
GameFrameworkBase
2023-04-01 16:24:25 +08:00
ALEXTANG
d2e940248a AssetSettings
AssetSettings
2023-04-01 15:49:12 +08:00
ALEXTANG
7067dcc8e6 ReDesign Resource Module
ReDesign Resource Module
2023-04-01 14:09:16 +08:00
ALEXTANG
7768727ab1 Utity
Utity
2023-04-01 13:22:36 +08:00
ALEXTANG
090cf7433a 游戏事件 2023-03-31 23:04:54 +08:00
ALEXTANG
90a2398105 GameEvent
GameEvent
2023-03-31 22:50:05 +08:00
ALEXTANG
aff27b7e5d Update 2023-03-31 22:44:08 +08:00
ALEXTANG
8dbecb3f33 Update MemoryPool.MemoryCollection.cs 2023-03-31 22:39:48 +08:00
ALEXTANG
75f6c670ac Update IMemory.cs 2023-03-31 22:39:40 +08:00
ALEXTANG
0fc4fabdba Update main.unity 2023-03-31 22:36:23 +08:00
ALEXTANG
020f538e79 Update 2023-03-31 18:05:04 +08:00
ALEXTANG
1c393ae1e4 Update TEngine.Runtime.asmdef 2023-03-31 17:48:45 +08:00
ALEXTANG
17fe247cb8 Update TEngine.Editor.asmdef 2023-03-31 17:48:42 +08:00
ALEXTANG
2df234e999 内置UniTask
内置UniTask
2023-03-31 17:47:04 +08:00
ALEXTANG
717ecfed07 Update
Update
2023-03-31 17:35:22 +08:00
ALEXTANG
36353294d6 Start TEngine3.0
Start TEngine3.0
2023-03-31 17:27:49 +08:00
ALEXTANG
179765c43c Update README.md 2023-02-10 12:15:40 +08:00
ALEXTANG
bc5f12ed88 下载资源MD5校验问题修正,支持断点续传
下载资源MD5校验问题修正,支持断点续传
2023-02-10 12:11:20 +08:00
ALEXTANG
1edbfcc086 升级HybridCLR 1.1.20
升级HybridCLR 1.1.20
2023-02-10 12:06:15 +08:00
ALEXTANG
f1bd8e4a5f Json库更新
Json库更新
2023-02-01 16:05:13 +08:00
ALEXTANG
3dafe7ec45 UIManager ShowWindowsAsync
UIManager ShowWindowsAsync
2022-10-27 20:18:40 +08:00
ALEXTANG
74092e6399 事件系统优化更新
事件系统优化更新
1.使用静态代替单例,静态方法调用时候内存地址无需二次偏移定位
2.UI事件在关闭UI时自动反监听
2022-10-26 15:14:04 +08:00
ALEXTANG
2e175fbcac Update ProcedureCodeInit.cs 2022-10-25 11:11:04 +08:00
ALEXTANG
54ff5fab41 更新HybirdCLR Procedure
更新HybirdCLR Procedure
2022-10-25 11:06:27 +08:00
ALEXTANG
3146dfdc73 Update gitignore
Update gitignore
2022-10-24 20:41:02 +08:00
ALEXTANG
94be77bec5 Update Demo目录
Update Demo目录
2022-10-24 20:39:01 +08:00
ALEXTANG
5186b2f8fc 更新HybirdCLR
更新HybirdCLR
2022-10-24 20:36:52 +08:00
ALEXTANG
6eb4f25137 Fix SettingComponent
Fix SettingComponent
2022-10-24 20:29:05 +08:00
ALEXTANG
a3d4b39443 Update BehaviourSingleton.cs 2022-10-08 19:04:24 +08:00
ALEXTANG
9195856bb9 Update UIManager.cs 2022-10-08 17:52:29 +08:00
ALEXTANG
06d60c35f5 Update UIWindowBase.cs 2022-10-08 17:52:25 +08:00
ALEXTANG
7f919f1bd4 Update TEngine.Demo.asmdef 2022-10-08 15:12:15 +08:00
ALEXTANG
c7478134f4 DefaultSetting
DefaultSetting
2022-09-29 17:25:02 +08:00
ALEXTANG
e3b78989cd Update DefaultSettingHelper.cs 2022-09-29 17:20:05 +08:00
ALEXTANG
0af3e8facc Update DefaultSettingHelper.cs 2022-09-29 17:18:26 +08:00
ALEXTANG
f0af27bde6 Update TEngine.prefab 2022-09-29 17:15:02 +08:00
ALEXTANG
9bf3a97050 Update DefaultSettingHelper
Update DefaultSettingHelper
2022-09-29 17:14:59 +08:00
ALEXTANG
d9b8e75fbb Create BinaryExtension
Create BinaryExtension
2022-09-29 17:14:31 +08:00
ALEXTANG
5e85b546f3 Update GameObjectHelper.cs 2022-09-29 17:13:54 +08:00
ALEXTANG
44ef66fc39 Remove UniTask
Remove UniTask
2022-09-27 17:55:11 +08:00
ALEXTANG
eac570dd74 Update GameObjectHelper.cs 2022-09-27 11:40:32 +08:00
ALEXTANG
8f8101e566 Simpale GameObject Pool
Simpale GameObject Pool
2022-09-27 11:37:09 +08:00
ALEXTANG
28d480b07d Update NetDemo.unity 2022-09-23 17:06:55 +08:00
ALEXTANG
bd5bb60680 Update NetTestMain.cs 2022-09-23 16:10:07 +08:00
ALEXTANG
49c9ee4e97 Update ReadmeEditor.cs 2022-09-23 16:06:54 +08:00
ALEXTANG
bdd4a1cff7 UIDemo
UIDemo
2022-09-23 16:05:21 +08:00
ALEXTANG
eb19b04cee HotUpdateDemo
HotUpdateDemo
2022-09-23 16:05:05 +08:00
ALEXTANG
f121d83fbe Update Readme.asset 2022-09-23 15:57:52 +08:00
ALEXTANG
50d9ca28d0 Update PlayerActor.cs 2022-09-23 15:57:47 +08:00
ALEXTANG
b8421a393e Update PlayerActor.cs 2022-09-23 15:54:55 +08:00
ALEXTANG
b4eb10cc50 ActorDemo
ActorDemo
2022-09-23 15:49:58 +08:00
ALEXTANG
3aedadc060 UIWindowBaseExt
UIWindowBaseExt
2022-09-23 15:49:03 +08:00
ALEXTANG
7f33bd76f7 PlayerActor
PlayerActor
2022-09-23 15:44:51 +08:00
ALEXTANG
9f14200da7 ActorDemo
ActorDemo
2022-09-23 15:34:19 +08:00
ALEXTANG
f775c2abfb Entity Demo
Entity Demo
2022-09-23 15:06:27 +08:00
ALEXTANG
a23f74c2f9 增加Demo示例
增加Demo示例
2022-09-23 10:38:22 +08:00
ALEXTANG
752cf4bad6 Update GameActor.cs 2022-09-19 19:59:04 +08:00
ALEXTANG
87e502ed21 Update GameActorExt.cs 2022-09-19 19:48:01 +08:00
ALEXTANG
82c76052c2 Update ActorComponent.cs 2022-09-19 19:47:58 +08:00
ALEXTANG
2c9a77e346 Update GameActor.cs 2022-09-19 19:37:34 +08:00
ALEXTANG
a2cc78cf52 Update ActorManager.cs 2022-09-19 19:37:31 +08:00
ALEXTANG
818bd8eafd ACSystem
ACSystem
2022-09-19 17:44:41 +08:00
ALEXTANG
a35830a912 OnDrawGizmos
OnDrawGizmos
2022-09-14 20:40:08 +08:00
ALEXTANG
d7ca31596d Remove LeanTween
Remove LeanTween
2022-09-07 19:34:20 +08:00
ALEXTANG
f3e0b46fe7 Update README.md 2022-09-07 17:59:56 +08:00
ALEXTANG
38aa170529 Update README.md 2022-09-07 17:55:45 +08:00
ALEXTANG
642eab2849 UIWindows 2022-09-07 17:35:58 +08:00
ALEXTANG
af7ff8749b Plugins UniTask
Plugins UniTask
2022-09-07 17:35:34 +08:00
ALEXTANG
3a4e40e53d Time
Time
2022-09-07 15:13:06 +08:00
ALEXTANG
f0c9ec2000 EntitySystem
EntitySystem
2022-09-07 14:50:18 +08:00
ALEXTANG
8b84530d0e Update EntityExtension.cs 2022-09-06 20:56:52 +08:00
ALEXTANG
f25015ec39 ObjectPool
ObjectPool
2022-09-06 20:37:54 +08:00
ALEXTANG
625167430d Update
Update
2022-09-06 20:15:23 +08:00
ALEXTANG
7c5641a860 Entity
Entity
2022-09-06 20:14:33 +08:00
ALEXTANG
adfe06bc04 Delete TestUI.prefab.meta 2022-09-06 19:15:20 +08:00
ALEXTANG
20e0de606b Update ScriptGenerator.cs 2022-09-06 19:12:57 +08:00
ALEXTANG
511abf0a87 Tween
Tween
2022-09-06 19:12:53 +08:00
ALEXTANG
b7cad18b16 Entity
Entity
2022-09-05 18:52:18 +08:00
ALEXTANG
9c22db2b7a Update GameEventMgr.cs 2022-09-05 18:10:24 +08:00
ALEXTANG
6f3808a97e Update TResource.cs 2022-09-05 17:45:45 +08:00
ALEXTANG
196d2b0666 Update GameEvent.cs 2022-09-05 17:45:38 +08:00
ALEXTANG
1a9ab2d78c LoadAssetCallBack
LoadAssetCallBack
2022-09-05 15:15:51 +08:00
ALEXTANG
219649e684 ObjectPool
ObjectPool
2022-09-05 14:47:26 +08:00
ALEXTANG
0766482fab Update
Update
2022-09-05 14:27:27 +08:00
ALEXTANG
455e57b435 Update
Update
2022-09-05 14:27:02 +08:00
ALEXTANG
092de9937c Update gen_client_cfg_list.bat 2022-09-05 13:58:43 +08:00
ALEXTANG
f27cfa2158 FileServer
FileServer
2022-09-05 13:57:46 +08:00
ALEXTANG
4a6cf28df3 ConfigTabel
ConfigTabel
2022-09-05 13:57:06 +08:00
ALEXTANG
a0d811ee16 Update DefaultObjectPoolHelper.cs 2022-09-04 17:18:19 +08:00
ALEXTANG
cddb45b654 ObjectPool
ObjectPool
2022-09-04 17:11:10 +08:00
ALEXTANG
7f3b8efbd8 Update UpdateInstance.cs 2022-09-04 16:46:07 +08:00
ALEXTANG
4bd5cb4f08 统一Update,实现Priority优先级轮询
统一Update,实现Priority优先级轮询
2022-09-04 13:21:58 +08:00
ALEXTANG
284c16a4d7 Update Helper
Update Helper
2022-09-03 17:03:03 +08:00
ALEXTANG
5bfa23bcf9 Update ProcedureCodeInit.cs 2022-09-03 16:52:57 +08:00
ALEXTANG
73007437ac Update NetworkChannelHelper.cs 2022-09-02 17:33:16 +08:00
ALEXTANG
6bb7dcc672 Update NetworkManager.TcpNetworkChannel.cs 2022-09-02 17:19:29 +08:00
ALEXTANG
1a6b17cd5f Update NetworkManager.TcpNetworkChannel.cs 2022-09-02 17:16:37 +08:00
ALEXTANG
0236a79da4 Update ProtoUtils.cs 2022-09-02 17:16:31 +08:00
ALEXTANG
4af929beb6 Update NetworkManager.TcpNetworkChannel.cs 2022-09-02 17:06:28 +08:00
ALEXTANG
b0119b711c Update UIManager.cs 2022-09-02 17:04:34 +08:00
ALEXTANG
fee3e475f0 Update UIWindow.cs 2022-09-02 17:04:29 +08:00
ALEXTANG
fb668bfb48 Update UIManager.cs 2022-09-02 17:03:03 +08:00
ALEXTANG
d85e49e923 Update NetworkChannelHelper.cs 2022-09-02 16:52:48 +08:00
ALEXTANG
c2f0e03c80 Update
Update
2022-09-02 16:51:31 +08:00
ALEXTANG
a2503421b8 Update ProtoUtils.cs 2022-09-02 16:01:10 +08:00
ALEXTANG
af96cd0649 Update README.md 2022-09-02 11:06:11 +08:00
ALEXTANG
610e1e847f 移除冗余设计
移除冗余设计
2022-09-01 17:53:31 +08:00
ALEXTANG
e1a0f851f2 Update NetworkManager.NetworkChannelBase.cs 2022-09-01 17:48:09 +08:00
ALEXTANG
acd7b09320 Update UnityResourceHelper.cs 2022-09-01 15:03:52 +08:00
ALEXTANG
d0b18aebfe #pragma warning disable CS0162
#pragma warning disable CS0162
2022-09-01 15:00:22 +08:00
ALEXTANG
c6691d9e2f 泛型约束
泛型约束
2022-09-01 15:00:09 +08:00
ALEXTANG
5f6054c986 资源桥接器实现IResourceHelper
资源桥接器实现IResourceHelper
2022-09-01 14:18:44 +08:00
ALEXTANG
adc2cbd3db Update Network.cs 2022-09-01 11:45:51 +08:00
ALEXTANG
3d7c49a94a Update Network.cs 2022-09-01 11:37:50 +08:00
ALEXTANG
b9e68ed948 Packet & ProtoTools
Packet & ProtoTools
2022-09-01 11:30:38 +08:00
ALEXTANG
6d38c5ae68 NetUtil
NetUtil
2022-08-31 17:59:34 +08:00
ALEXTANG
5223d4f936 DataCenter
DataCenter
2022-08-31 17:58:03 +08:00
ALEXTANG
f72821443c Update
Update
2022-08-31 17:49:48 +08:00
ALEXTANG
789341701a Update
Update
2022-08-31 16:25:16 +08:00
ALEXTANG
63d3817dde 先移除网络
先移除网络
2022-08-31 10:28:06 +08:00
ALEXTANG
13c2e53693 Update 2022-08-31 10:15:15 +08:00
ALEXTANG
6765125f25 Update
Update
2022-08-30 17:20:12 +08:00
ALEXTANG
4368c0a2b8 Update
Update
2022-08-30 17:00:13 +08:00
ALEXTANG
5fc0015144 DebugerComponent 2022-08-30 11:02:24 +08:00
ALEXTANG
8c1c3b7291 Core Helper
Core Helper
2022-08-29 20:57:41 +08:00
ALEXTANG
f5e783a42c NetWorkInspect
NetWorkInspect
2022-08-29 20:48:33 +08:00
ALEXTANG
7158915169 NetWork
NetWork
2022-08-29 20:34:39 +08:00
ALEXTANG
ce1eab346b Update ProcedureCodeInit.cs 2022-08-29 15:58:57 +08:00
ALEXTANG
793b9e8b36 Update .gitignore 2022-08-29 15:51:55 +08:00
ALEXTANG
a3fde33dfc HotFix demo
HotFix demo
2022-08-29 15:51:51 +08:00
ALEXTANG
2c7367fab7 Update ProcedureCodeInit.cs 2022-08-29 15:51:03 +08:00
ALEXTANG
8e563e4877 Update
Update
2022-08-29 15:39:31 +08:00
ALEXTANG
baa26dba51 移除HubirdBuildProcessors
移除HubirdBuildProcessors
2022-08-29 15:01:54 +08:00
ALEXTANG
702e29177e HybirdCLRInjector
HybirdCLRInjector
2022-08-29 14:54:19 +08:00
ALEXTANG
072a117643 HybirdCLR Helper
HybirdCLR Helper
2022-08-29 14:33:00 +08:00
ALEXTANG
052d81e039 GameTimeWather
GameTimeWather
2022-08-29 13:26:49 +08:00
ALEXTANG
9640b55a79 Update ResourceComponent.cs 2022-08-29 11:50:37 +08:00
ALEXTANG
d89ebf85b1 Demo
Demo
2022-08-29 11:48:13 +08:00
ALEXTANG
7302010182 Update ProcedureStartGame.cs 2022-08-29 11:41:50 +08:00
ALEXTANG
6b096d5ade UIModule
UIModule
2022-08-26 17:23:29 +08:00
ALEXTANG
41dc431897 warning disable CS0649
warning disable CS0649
2022-08-26 17:21:31 +08:00
ALEXTANG
8983c52b59 UIModule
UIModule
2022-08-26 17:12:43 +08:00
ALEXTANG
776b84adc2 UIModule
UIModule
2022-08-26 17:08:45 +08:00
ALEXTANG
158d6a1cd8 UIModule Resources
UIModule Resources
2022-08-26 16:21:34 +08:00
ALEXTANG
50aec0cb06 Prefabs ReadMe
Prefabs ReadMe
2022-08-26 15:46:00 +08:00
ALEXTANG
edf32a6fcd 调整目录结构
调整目录结构
2022-08-26 15:43:30 +08:00
ALEXTANG
a9b6466334 Update ResConfigUtil.cs 2022-08-26 15:38:52 +08:00
ALEXTANG
ed4a75011f Update .gitignore 2022-08-26 14:56:30 +08:00
ALEXTANG
2a920fcb36 Update .gitignore 2022-08-26 14:55:56 +08:00
ALEXTANG
d2806b3c0c Update Newtonsoft.Json.dll 2022-08-26 14:50:12 +08:00
ALEXTANG
dc0b132bf1 编码格式to utf-8
编码格式to utf-8
2022-08-26 14:18:22 +08:00
ALEXTANG
cd18e98a8b Update GameEventMgr.cs 2022-08-26 14:03:47 +08:00
ALEXTANG
a12ee7699e Update TAudio.cs 2022-08-26 14:00:15 +08:00
ALEXTANG
8be2dc5ec3 Update Language.cs 2022-08-26 13:58:13 +08:00
ALEXTANG
0c6aa88ac5 Update LoaderUtilities.cs 2022-08-26 13:50:57 +08:00
ALEXTANG
de58febd79 Update LoadStyle.cs 2022-08-26 13:48:58 +08:00
ALEXTANG
9d53c68de6 Update .gitignore 2022-08-26 13:44:56 +08:00
ALEXTANG
6bdb44abc8 Update ProcedureCheckVersion.cs 2022-08-26 13:33:53 +08:00
ALEXTANG
54d7a4558c Update .gitignore 2022-08-26 13:30:47 +08:00
ALEXTANG
d1bf852371 Update DemoScene.unity 2022-08-25 22:58:56 +08:00
ALEXTANG
e614be853f Update TEngine.prefab 2022-08-25 22:58:21 +08:00
ALEXTANG
40bc2d3491 Rmv
Rmv
2022-08-25 22:56:37 +08:00
ALEXTANG
cc908c2b99 重置2.0.0(beta)
重置2.0.0(beta)
2022-08-25 22:53:10 +08:00
2954 changed files with 257669 additions and 121822 deletions

52
.gitignore vendored
View File

@@ -13,7 +13,8 @@
# /[Aa]ssets/TResources/DLL/
/[Aa]ssets/StreamingAssets
/BuildBundleInfo/
/[Aa]ssets/AATest/
[Aa]ssets/AATest/
[Aa]ssets/AATest.meta
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
@@ -62,8 +63,8 @@ sysinfo.txt
# Crashlytics generated file
crashlytics-build.properties
# Log
TEnginePersistentDataPath/Log
# TEnginePersistentDataPath
TEnginePersistentDataPath/
# Hotfix
TEngineHotUpdate/bin
@@ -71,3 +72,48 @@ TEngineHotUpdate/obj
#HybirdCLR(HuaTuo)
/HybirdCLRData/
[Hh]ybridCLRData/
#AATemp
[Aa]ssets/AATemp/
[Aa]ssets/AATemp.meta
#Rider
/.idea/
# ABConfig
[Aa]ssets/BuildConfig/
[Aa]ssets/BuildConfig.meta
[Aa]ssets/StreamingAssets/
[Aa]ssets/StreamingAssets.meta
Assets/HybridCLRBuildCache/AssetBundleOutput.meta
Assets/HybridCLRBuildCache/AssetBundleOutput/StandaloneWindows.meta
Assets/HybridCLRBuildCache.meta
Assets/HybridCLRBuildCache/AssetBundleSourceData.meta
Assets/HybridCLRBuildCache/AssetBundleSourceData/StandaloneWindows.meta
#Bundles
Bundles/
#Sandbox
Sandbox/
#Luban
Luban/.cache.meta
GenerateDatas/
#HybridCLR
Assets/HybridCLRData.meta
UserSettings/Search.settings
#Unity UserSettings
UserSettings/Search.index
UserSettings/Layouts/default-2021.dwlt
#UnityOnlineServiceData
Assets/UnityOnlineServiceData.meta
Assets/UnityOnlineServiceData
.DS_Store

8
Assets/AssetRaw.meta Normal file
View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1 @@
Powered by TEngine @alex

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ba11f0707eb5f814392cbf12498aba94
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/AssetRaw/DLL.meta Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

8
Assets/AssetRaw/UI.meta Normal file
View File

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

View File

@@ -0,0 +1,382 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2683445925571829816
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2683445925571829817}
- component: {fileID: 2683445925571829820}
- component: {fileID: 2683445925571829823}
- component: {fileID: 2683445925571829822}
m_Layer: 5
m_Name: LogUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2683445925571829817
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445925571829816}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2683445927021212027}
- {fileID: 2683445926897574365}
- {fileID: 6164213652418733423}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &2683445925571829820
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445925571829816}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &2683445925571829823
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445925571829816}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &2683445925571829822
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445925571829816}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 55
--- !u!1 &2683445926897574364
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2683445926897574365}
- component: {fileID: 2683445926897574339}
- component: {fileID: 2683445926897574338}
m_Layer: 5
m_Name: m_textError
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2683445926897574365
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445926897574364}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2683445925571829817}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -10}
m_SizeDelta: {x: -40, y: -60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2683445926897574339
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445926897574364}
m_CullTransparentMesh: 1
--- !u!114 &2683445926897574338
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445926897574364}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 1, b: 0.25490198, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 36
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
--- !u!1 &2683445927021212026
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2683445927021212027}
- component: {fileID: 2683445927021212025}
- component: {fileID: 2683445927021212024}
m_Layer: 5
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2683445927021212027
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445927021212026}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2683445925571829817}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2683445927021212025
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445927021212026}
m_CullTransparentMesh: 1
--- !u!114 &2683445927021212024
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2683445927021212026}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.34901962}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4229713281919198382
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6164213652418733423}
- component: {fileID: 9023329926868908831}
- component: {fileID: 5643637730633076069}
- component: {fileID: 6030240422437967231}
m_Layer: 5
m_Name: m_btnClose
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6164213652418733423
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4229713281919198382}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2683445925571829817}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9023329926868908831
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4229713281919198382}
m_CullTransparentMesh: 1
--- !u!114 &5643637730633076069
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4229713281919198382}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.007843138}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &6030240422437967231
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4229713281919198382}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5643637730633076069}
m_OnClick:
m_PersistentCalls:
m_Calls: []

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ad23fce0bd282924fa4aedb4da24684f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -0,0 +1,96 @@
fileFormatVersion: 2
guid: f9a06e163014f4f46b14f4499d3e7240
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,147 @@
fileFormatVersion: 2
guid: 2761fc23b4aa7e34187ac5ffbc3fad9b
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 268, y: 79, z: 267, w: 82}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,147 @@
fileFormatVersion: 2
guid: d623a2b7e069a4c4592d3da48f476189
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 39, y: 38, z: 40, w: 37}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -0,0 +1,147 @@
fileFormatVersion: 2
guid: 57e4117f4cd6ae54284898652e70d553
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

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

8
Assets/Atlas.meta Normal file
View File

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

View File

@@ -0,0 +1,69 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!687078895 &4343727234628468602
SpriteAtlas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIRaw_Atlas_Common
serializedVersion: 2
m_EditorData:
serializedVersion: 2
textureSettings:
serializedVersion: 2
anisoLevel: 0
compressionQuality: 0
maxTextureSize: 0
textureCompression: 0
filterMode: 1
generateMipMaps: 0
readable: 0
crunchedCompression: 0
sRGB: 1
platformSettings:
- serializedVersion: 3
m_BuildTarget: iPhone
m_MaxTextureSize: 2048
m_ResizeAlgorithm: 0
m_TextureFormat: 49
m_TextureCompression: 1
m_CompressionQuality: 100
m_CrunchedCompression: 0
m_AllowsAlphaSplitting: 0
m_Overridden: 1
m_AndroidETC2FallbackOverride: 0
m_ForceMaximumCompressionQuality_BC6H_BC7: 0
packingSettings:
serializedVersion: 2
padding: 2
blockOffset: 1
allowAlphaSplitting: 0
enableRotation: 1
enableTightPacking: 0
enableAlphaDilation: 0
secondaryTextureSettings: {}
variantMultiplier: 1
packables:
- {fileID: 21300000, guid: f9a06e163014f4f46b14f4499d3e7240, type: 3}
- {fileID: 21300000, guid: 2761fc23b4aa7e34187ac5ffbc3fad9b, type: 3}
- {fileID: 21300000, guid: d623a2b7e069a4c4592d3da48f476189, type: 3}
- {fileID: 21300000, guid: 57e4117f4cd6ae54284898652e70d553, type: 3}
bindAsDefault: 1
isAtlasV2: 0
cachedData: {fileID: 0}
m_MasterAtlas: {fileID: 0}
m_PackedSprites:
- {fileID: 21300000, guid: 2761fc23b4aa7e34187ac5ffbc3fad9b, type: 3}
- {fileID: 21300000, guid: f9a06e163014f4f46b14f4499d3e7240, type: 3}
- {fileID: 21300000, guid: d623a2b7e069a4c4592d3da48f476189, type: 3}
- {fileID: 21300000, guid: 57e4117f4cd6ae54284898652e70d553, type: 3}
m_PackedSpriteNamesToIndex:
- red_button
- blue_button
- white_background
- white_button
m_RenderDataMap: {}
m_Tag: UIRaw_Atlas_Common
m_IsVariant: 0
m_IsPlaceholder: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1a8431d2a64361c4d821790ed88aeb3d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4343727234628468602
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

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

View File

@@ -1,344 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &209661865
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 209661867}
- component: {fileID: 209661866}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &209661866
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 209661865}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &209661867
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 209661865}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &400364856
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 400364859}
- component: {fileID: 400364858}
- component: {fileID: 400364857}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &400364857
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 400364856}
m_Enabled: 1
--- !u!20 &400364858
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 400364856}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &400364859
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 400364856}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1891593711
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1891593712}
- component: {fileID: 1891593713}
m_Layer: 0
m_Name: TEngine
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1891593712
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1891593711}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1891593713
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1891593711}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6c3c520ddf3e7a74499ea41cf4b09db2, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 8ef518d49b9758848883444880ef20c8
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/GameScripts.meta Normal file
View File

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

View File

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

View File

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

View File

@@ -0,0 +1,62 @@
using UnityEditor;
using UnityEngine;
namespace TEngine.Editor.Inspector
{
[CustomEditor(typeof(Network))]
internal sealed class NetworkInspector : GameFrameworkInspector
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
if (!EditorApplication.isPlaying)
{
EditorGUILayout.HelpBox("Available during runtime only.", MessageType.Info);
return;
}
Network t = (Network)target;
if (IsPrefabInHierarchy(t.gameObject))
{
EditorGUILayout.LabelField("Network Channel Count", t.NetworkChannelCount.ToString());
INetworkChannel[] networkChannels = t.GetAllNetworkChannels();
foreach (INetworkChannel networkChannel in networkChannels)
{
DrawNetworkChannel(networkChannel);
}
}
Repaint();
}
private void DrawNetworkChannel(INetworkChannel networkChannel)
{
EditorGUILayout.BeginVertical("box");
{
EditorGUILayout.LabelField(networkChannel.Name, networkChannel.Connected ? "Connected" : "Disconnected");
EditorGUILayout.LabelField("Service Type", networkChannel.ServiceType.ToString());
EditorGUILayout.LabelField("Address Family", networkChannel.AddressFamily.ToString());
EditorGUILayout.LabelField("Local Address", networkChannel.Connected ? networkChannel.Socket.LocalEndPoint.ToString() : "Unavailable");
EditorGUILayout.LabelField("Remote Address", networkChannel.Connected ? networkChannel.Socket.RemoteEndPoint.ToString() : "Unavailable");
EditorGUILayout.LabelField("Send Packet", Utility.Text.Format("{0} / {1}", networkChannel.SendPacketCount, networkChannel.SentPacketCount));
EditorGUILayout.LabelField("Receive Packet", Utility.Text.Format("{0} / {1}", networkChannel.ReceivePacketCount, networkChannel.ReceivedPacketCount));
EditorGUILayout.LabelField("Miss Heart Beat Count", networkChannel.MissHeartBeatCount.ToString());
EditorGUILayout.LabelField("Heart Beat", Utility.Text.Format("{0:F2} / {1:F2}", networkChannel.HeartBeatElapseSeconds, networkChannel.HeartBeatInterval));
EditorGUI.BeginDisabledGroup(!networkChannel.Connected);
{
if (GUILayout.Button("Disconnect"))
{
networkChannel.Close();
}
}
EditorGUI.EndDisabledGroup();
}
EditorGUILayout.EndVertical();
EditorGUILayout.Separator();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3301ba180cdc446bbdf823c860ae7a68
timeCreated: 1682045195

View File

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

View File

@@ -0,0 +1,489 @@
using System;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.U2D;
using UnityEngine;
using UnityEngine.U2D;
using Object = UnityEngine.Object;
/// <summary>
/// 图集导入管线。
/// </summary>
public class SpritePostprocessor : AssetPostprocessor
{
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
{
foreach (var s in importedAssets)
{
EditorSpriteSaveInfo.OnImportSprite(s);
}
foreach (var s in deletedAssets)
{
EditorSpriteSaveInfo.OnDeleteSprite(s);
}
foreach (var s in movedFromAssetPaths)
{
EditorSpriteSaveInfo.OnDeleteSprite(s);
}
foreach (var s in movedAssets)
{
EditorSpriteSaveInfo.OnImportSprite(s);
}
}
}
public static class EditorSpriteSaveInfo
{
private const string NormalAtlasDir = "Assets/Atlas";
private const string UISpritePath = "Assets/AssetRaw/UIRaw";
private const string UIAtlasPath = "Assets/AssetRaw/UIRaw/Atlas";
private const string UIRawPath = "Assets/AssetRaw/UIRaw/UIRaw";
private static List<string> m_dirtyAtlasList = new List<string>();
private static Dictionary<string, List<string>> m_allASprites = new Dictionary<string, List<string>>();
private static Dictionary<string, string> m_uiAtlasMap = new Dictionary<string, string>();
private static bool m_inited = false;
private static bool m_dirty = false;
public static void Init()
{
if (m_inited)
{
return;
}
EditorApplication.update += CheckDirty;
}
public static void CheckDirty()
{
if (m_dirty)
{
m_dirty = false;
AssetDatabase.Refresh();
float lastProgress = -1;
for (int i = 0; i < m_dirtyAtlasList.Count; i++)
{
string atlasName = m_dirtyAtlasList[i];
Debug.Log("更新图集 : " + atlasName);
var curProgress = (float)i / m_dirtyAtlasList.Count;
if (curProgress > lastProgress + 0.01f)
{
lastProgress = curProgress;
var progressText = $"当前进度:{i}/{m_dirtyAtlasList.Count} {atlasName}";
bool cancel = EditorUtility.DisplayCancelableProgressBar("刷新图集" + atlasName, progressText, curProgress);
if (cancel)
{
break;
}
}
bool isUI = atlasName.StartsWith("UIRaw");
SaveAtlas(atlasName, isUI);
}
EditorUtility.ClearProgressBar();
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
m_dirtyAtlasList.Clear();
}
}
public static void OnImportSprite(string assetPath)
{
if (!assetPath.StartsWith(UISpritePath))
{
return;
}
TextureImporter ti = AssetImporter.GetAtPath(assetPath) as TextureImporter;
if (ti != null)
{
var modify = false;
if (assetPath.StartsWith(UISpritePath))
{
if (ti.textureType != TextureImporterType.Sprite)
{
ti.textureType = TextureImporterType.Sprite;
modify = true;
}
if (!string.IsNullOrEmpty(ti.spritePackingTag))
{
ti.spritePackingTag = string.Empty;
modify = true;
}
var setting = new TextureImporterSettings();
ti.ReadTextureSettings(setting);
if (setting.spriteGenerateFallbackPhysicsShape)
{
setting.spriteGenerateFallbackPhysicsShape = false;
ti.SetTextureSettings(setting);
modify = true;
}
if (IsKeepRawImage(assetPath))
{
//调整android格式
var andPlatformSettings = ti.GetPlatformTextureSettings("Android");
if (!andPlatformSettings.overridden)
{
andPlatformSettings.overridden = true;
modify = true;
}
if (andPlatformSettings.format != TextureImporterFormat.ASTC_6x6)
{
andPlatformSettings.format = TextureImporterFormat.ASTC_6x6;
ti.SetPlatformTextureSettings(andPlatformSettings);
modify = true;
}
//调整ios格式
var iosPlatformSettings = ti.GetPlatformTextureSettings("iPhone");
if (!iosPlatformSettings.overridden)
{
iosPlatformSettings.overridden = true;
modify = true;
}
if (iosPlatformSettings.format != TextureImporterFormat.ASTC_5x5)
{
iosPlatformSettings.format = TextureImporterFormat.ASTC_5x5;
iosPlatformSettings.compressionQuality = 50;
ti.SetPlatformTextureSettings(iosPlatformSettings);
modify = true;
}
}
}
if (modify)
{
ti.SaveAndReimport();
}
if (ti.textureType == TextureImporterType.Sprite)
{
OnProcessSprite(assetPath);
}
}
}
/// <summary>
/// 是否保持散图(不打图集)
/// </summary>
/// <param name="dirPath"></param>
/// <returns></returns>
public static bool IsKeepRawImage(string dirPath)
{
return dirPath.Contains("UIRaw/Raw/") || dirPath.Contains("UIRaw_Raw_");
}
public static string GetSpritePath(string assetPath)
{
string path = assetPath.Substring(0, assetPath.LastIndexOf("."));
path = path.Replace("Assets/AssetRaw/", "");
return path;
}
/// <summary>
/// 根据文件路径,返回图集名称
/// </summary>
/// <param name="fullName"></param>
/// <returns></returns>
public static string GetPackageTag(string fullName)
{
fullName = fullName.Replace("\\", "/");
int idx = fullName.LastIndexOf("UIRaw", StringComparison.Ordinal);
if (idx == -1)
{
return "";
}
if (IsKeepRawImage(fullName))
{
return "";
}
var atlasPath = fullName.Substring(idx);
string str = atlasPath;
str = str.Substring(0, str.LastIndexOf("/", StringComparison.Ordinal)).Replace("/", "_");
return str;
}
public static void OnProcessSprite(string assetPath)
{
if (!assetPath.StartsWith("Assets"))
{
return;
}
if (assetPath.StartsWith("Assets/UIRaw_Delete"))
{
return;
}
Init();
var spriteName = Path.GetFileNameWithoutExtension(assetPath);
var spritePath = GetSpritePath(assetPath);
if (!m_uiAtlasMap.TryGetValue(spriteName, out string oldAssetPath) || spritePath == oldAssetPath)
{
m_uiAtlasMap[spriteName] = spritePath;
m_dirty = true;
}
else
{
Debug.LogError($"有重名的图片:{spriteName}\n旧图集{oldAssetPath}\n新图集{spritePath} ");
m_uiAtlasMap[spriteName] = spritePath;
m_dirty = true;
}
string atlasName = GetPackageTag(assetPath);
if (string.IsNullOrEmpty(atlasName))
{
bool keepRaw = IsKeepRawImage(assetPath);
if (!keepRaw)
{
Debug.LogError($"empty packingTag of asset :{assetPath} !!!");
}
return;
}
else
{
List<string> ret;
if (!m_allASprites.TryGetValue(atlasName, out ret))
{
ret = new List<string>();
m_allASprites.Add(atlasName, ret);
}
if (!ret.Contains(assetPath))
{
ret.Add(assetPath);
m_dirty = true;
if (!m_dirtyAtlasList.Contains(atlasName))
{
m_dirtyAtlasList.Add(atlasName);
}
}
}
}
public static void OnDeleteSprite(string assetPath)
{
if (assetPath.StartsWith("Assets/UIRaw_Delete"))
{
return;
}
if (!assetPath.StartsWith(UISpritePath))
{
return;
}
Init();
string atlasName = GetPackageTag(assetPath);
if (!m_allASprites.TryGetValue(atlasName, out var ret))
{
return;
}
//改成文件名的匹配
if (!ret.Exists(s => Path.GetFileName(s) == Path.GetFileName(assetPath)))
{
return;
}
if (assetPath.StartsWith(UISpritePath))
{
var spriteName = Path.GetFileNameWithoutExtension(assetPath);
if (m_uiAtlasMap.ContainsKey(spriteName))
{
m_uiAtlasMap.Remove(spriteName);
m_dirty = true;
}
}
ret.Remove(assetPath);
m_dirty = true;
if (!m_dirtyAtlasList.Contains(atlasName))
{
m_dirtyAtlasList.Add(atlasName);
}
}
#region
public static void SaveAtlas(string atlasName, bool isUI)
{
List<Object> spriteList = new List<Object>();
if (m_allASprites.ContainsKey(atlasName))
{
var list = m_allASprites[atlasName];
list.Sort(StringComparer.Ordinal);
foreach (var s in list)
{
var sprite = AssetDatabase.LoadAssetAtPath<Sprite>(s);
if (sprite != null)
{
spriteList.Add(sprite);
}
}
}
var path = $"{NormalAtlasDir}/{atlasName}.spriteatlas";
if (spriteList.Count == 0)
{
if (File.Exists(path))
{
AssetDatabase.DeleteAsset(path);
}
return;
}
var atlas = new SpriteAtlas();
var setting = new SpriteAtlasPackingSettings
{
blockOffset = 1,
padding = 2,
enableRotation = true
};
bool isOpaque = atlasName.Contains("Opaque");
var textureSetting = new SpriteAtlasTextureSettings
{
generateMipMaps = false,
sRGB = true,
filterMode = FilterMode.Bilinear
};
atlas.SetTextureSettings(textureSetting);
var iphonePlatformSetting = atlas.GetPlatformSettings("iPhone");
if (!iphonePlatformSetting.overridden)
{
iphonePlatformSetting.overridden = true;
iphonePlatformSetting.format = isOpaque ? TextureImporterFormat.ASTC_5x5 : TextureImporterFormat.ASTC_5x5;
iphonePlatformSetting.compressionQuality = 100;
atlas.SetPlatformSettings(iphonePlatformSetting);
}
var androidPlatformSetting = atlas.GetPlatformSettings("Android");
if (isOpaque && !androidPlatformSetting.overridden)
{
androidPlatformSetting.overridden = true;
androidPlatformSetting.format = TextureImporterFormat.ETC_RGB4;
androidPlatformSetting.compressionQuality = 100;
atlas.SetPlatformSettings(androidPlatformSetting);
}
atlas.SetPackingSettings(setting);
atlas.Add(spriteList.ToArray());
AssetDatabase.CreateAsset(atlas, path);
}
#endregion
#region
private static Dictionary<string, List<string>> m_tempAllASprites = new Dictionary<string, List<string>>();
[MenuItem("TEngine/图集/重新生成UI图集")]
static void ForceGenAtlas()
{
Init();
List<string> needSaveAtlas = new List<string>();
m_tempAllASprites.Clear();
var findAssets = AssetDatabase.FindAssets("t:sprite", new[] { UIAtlasPath });
foreach (var findAsset in findAssets)
{
var path = AssetDatabase.GUIDToAssetPath(findAsset);
var atlasName = GetPackageTag(path);
if (!m_tempAllASprites.TryGetValue(atlasName, out var spriteList))
{
spriteList = new List<string>();
m_tempAllASprites[atlasName] = spriteList;
}
if (!spriteList.Contains(path))
{
spriteList.Add(path);
}
}
//有变化的才刷
var iter = m_tempAllASprites.GetEnumerator();
while (iter.MoveNext())
{
bool needSave = false;
var atlasName = iter.Current.Key;
var newSpritesList = iter.Current.Value;
List<string> existSprites;
if (m_allASprites.TryGetValue(atlasName, out existSprites))
{
if (existSprites.Count != newSpritesList.Count)
{
needSave = true;
existSprites.Clear();
existSprites.AddRange(newSpritesList);
}
else
{
for (int i = 0; i < newSpritesList.Count; i++)
{
if (!existSprites.Contains(newSpritesList[i]))
{
needSave = true;
break;
}
}
if (needSave)
{
existSprites.Clear();
existSprites.AddRange(newSpritesList);
}
}
}
else
{
needSave = true;
m_allASprites.Add(atlasName, new List<string>(newSpritesList));
}
if (needSave && !needSaveAtlas.Contains(atlasName))
{
needSaveAtlas.Add(atlasName);
}
}
iter.Dispose();
foreach (var atlas in needSaveAtlas)
{
Debug.LogFormat("Gen atlas:{0}", atlas);
SaveAtlas(atlas, true);
}
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
SpriteAtlasUtility.PackAllAtlases(EditorUserBuildSettings.activeBuildTarget);
Debug.Log("Gen end");
}
#endregion
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9e87a460a53ec5546a19e31705d13664
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

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

View File

@@ -0,0 +1,18 @@
{
"name": "BattleCore.Runtime",
"rootNamespace": "BattleCore.Runtime",
"references": [
"GUID:aa06d4cc755c979489c256c1bcca1dfb",
"GUID:d8b63aba1907145bea998dd612889d6b",
"GUID:a90b2d3377c5e4a4db95cc44fb82045e"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 641632c4f8079b94f963b5284d859a12
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 890abd3a957e406ab422fc468ba6c169
timeCreated: 1682353243

View File

@@ -0,0 +1,6 @@
namespace BattleCore.Runtime
{
public static class EntityExtension
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b4ef2dfa5ceac99458eb1745131a9c83
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,27 @@
using UnityEngine;
using Unity.Mathematics;
namespace BattleCore.Runtime
{
public static class MathematicsExt
{
public static int2 ToInt2(this Vector2Int vec) => new int2(vec.x, vec.y);
public static int3 ToInt3(this Vector3Int vec) => new int3(vec.x, vec.y, vec.z);
public static float2 ToFloat2(this Vector2 vec) => new float2(vec.x, vec.y);
public static float3 ToFloat3(this Vector3 vec) => new float3(vec.x, vec.y, vec.z);
public static bool IsEquals(this int2 a, int2 b) => math.all(a == b);
public static bool IsEquals(this int3 a, int3 b) => math.all(a == b);
public static Vector2Int ToVec2(this int2 vec) => new Vector2Int(vec.x, vec.y);
public static Vector3Int ToVec3(this int2 vec) => new Vector3Int(vec.x, vec.y, 0);
public static Vector3Int ToVec3(this int3 vec) => new Vector3Int(vec.x, vec.y, vec.z);
public static Vector2 ToVec2(this float2 vec) => new Vector2(vec.x, vec.y);
public static Vector3 ToVec3(this float3 vec) => new Vector3(vec.x, vec.y, vec.z);
public static int ManhattanDist(this int2 vec) => vec.x + vec.y;
public static int ManhattanDist(this int3 vec) => vec.x + vec.y + vec.z;
public static float ManhattanDist(this float2 vec) => vec.x + vec.y;
public static float ManhattanDist(this float3 vec) => vec.x + vec.y + vec.z;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2b0e288b918a41698571ec3d36059851
timeCreated: 1682353251

View File

@@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BattleCore.Runtime
{
public class Empty : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1fc394f8c6ad5304a82ff84b4263756f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -0,0 +1,33 @@
using System;
namespace TEngine
{
#region Attribute
[AttributeUsage(AttributeTargets.Class)]
public class UpdateAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class FixedUpdateAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class LateUpdateAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class RoleLoginAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class)]
public class RoleLogoutAttribute : Attribute
{
}
#endregion
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 80791cccf63d44faa348884ea0c506a2
timeCreated: 1684553027

View File

@@ -0,0 +1,16 @@
namespace GameBase
{
public class BaseClsTemplate<T>
{
protected static T Imp;
/// <summary>
/// Unity工程注册处理函数。
/// </summary>
/// <param name="imp">实现类。</param>
public static void RegisterImp(T imp)
{
Imp = imp;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bb7ef2f42b33ada47b3543dc7723fcb5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,79 @@
namespace TEngine
{
/// <summary>
/// 基础LogicSys,生命周期由TEngine实现推荐给系统实现
/// 减少多余的Mono保持系统层面只有一个Update。
/// 用主Mono来驱动LogicSys的生命周期。
/// </summary>
/// <typeparam name="T">逻辑系统类型。</typeparam>
public abstract class BaseLogicSys<T> : ILogicSys where T : new()
{
private static T _instance;
public static bool HasInstance => _instance != null;
public static T Instance
{
get
{
if (null == _instance)
{
_instance = new T();
}
return _instance;
}
}
#region virtual function
public virtual bool OnInit()
{
if (null == _instance)
{
_instance = new T();
}
return true;
}
public virtual void OnStart()
{
}
public virtual void OnUpdate()
{
}
public virtual void OnLateUpdate()
{
}
public virtual void OnFixedUpdate()
{
}
public virtual void OnRoleLogin()
{
}
public virtual void OnRoleLogout()
{
}
public virtual void OnDestroy()
{
}
public virtual void OnDrawGizmos()
{
}
public virtual void OnApplicationPause(bool pause)
{
}
public virtual void OnMapChanged()
{
}
#endregion
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: fc4ce19b17fd4277951d189b66f503e2
timeCreated: 1683120353

View File

@@ -0,0 +1,263 @@
using System;
using System.Collections.Generic;
namespace TEngine
{
/// <summary>
/// 通过LogicSys来驱动且具备Unity完整生命周期的单例不继承MonoBehaviour
/// </summary>
/// <typeparam name="T"></typeparam>
public abstract class BehaviourSingleton<T> : BaseBehaviourSingleton where T : BaseBehaviourSingleton, new()
{
private static T _instance;
public static T Instance
{
get
{
if (null == _instance)
{
_instance = new T();
Log.Assert(_instance != null);
_instance.Awake();
RegSingleton(_instance);
}
return _instance;
}
}
private static void RegSingleton(BaseBehaviourSingleton inst)
{
BehaviourSingleSystem.Instance.RegSingleton(inst);
}
}
public class BaseBehaviourSingleton
{
public bool IsStart = false;
public virtual void Active()
{
}
public virtual void Awake()
{
}
public virtual bool IsHaveLateUpdate()
{
return false;
}
public virtual void Start()
{
}
/// <summary>
/// 帧更新。
/// <remarks>需要UpdateAttribute。</remarks>
/// </summary>
public virtual void Update()
{
}
/// <summary>
/// 后帧更新。
/// <remarks>需要LateUpdateAttribute。</remarks>
/// </summary>
public virtual void LateUpdate()
{
}
/// <summary>
/// 物理帧更新。
/// <remarks>需要FixedUpdateAttribute。</remarks>
/// </summary>
public virtual void FixedUpdate()
{
}
public virtual void Destroy()
{
}
public virtual void OnPause()
{
}
public virtual void OnResume()
{
}
public virtual void OnDrawGizmos()
{
}
}
public class BehaviourSingleSystem : BaseLogicSys<BehaviourSingleSystem>
{
private readonly List<BaseBehaviourSingleton> _listInst = new List<BaseBehaviourSingleton>();
private readonly List<BaseBehaviourSingleton> _listStart = new List<BaseBehaviourSingleton>();
private readonly List<BaseBehaviourSingleton> _listUpdate = new List<BaseBehaviourSingleton>();
private readonly List<BaseBehaviourSingleton> _listLateUpdate = new List<BaseBehaviourSingleton>();
private readonly List<BaseBehaviourSingleton> _listFixedUpdate = new List<BaseBehaviourSingleton>();
public void RegSingleton(BaseBehaviourSingleton inst)
{
Log.Assert(!_listInst.Contains(inst));
_listInst.Add(inst);
_listStart.Add(inst);
if (HadAttribute<UpdateAttribute>(inst.GetType()))
{
_listUpdate.Add(inst);
}
if (HadAttribute<LateUpdateAttribute>(inst.GetType()))
{
_listLateUpdate.Add(inst);
}
if (HadAttribute<FixedUpdateAttribute>(inst.GetType()))
{
_listFixedUpdate.Add(inst);
}
}
public void UnRegSingleton(BaseBehaviourSingleton inst)
{
if (inst == null)
{
Log.Error($"BaseBehaviourSingleton Is Null");
return;
}
Log.Assert(_listInst.Contains(inst));
if (_listInst.Contains(inst))
{
_listInst.Remove(inst);
}
if (_listStart.Contains(inst))
{
_listStart.Remove(inst);
}
if (_listUpdate.Contains(inst))
{
_listUpdate.Remove(inst);
}
if (_listLateUpdate.Contains(inst))
{
_listLateUpdate.Remove(inst);
}
inst.Destroy();
inst = null;
}
public override void OnUpdate()
{
var listStart = _listStart;
var listToUpdate = _listUpdate;
var listToLateUpdate = _listLateUpdate;
if (listStart.Count > 0)
{
for (int i = 0; i < listStart.Count; i++)
{
var inst = listStart[i];
Log.Assert(!inst.IsStart);
inst.IsStart = true;
inst.Start();
listToUpdate.Add(inst);
if (inst.IsHaveLateUpdate())
{
listToLateUpdate.Add(inst);
}
}
listStart.Clear();
}
var listUpdateCnt = listToUpdate.Count;
for (int i = 0; i < listUpdateCnt; i++)
{
var inst = listToUpdate[i];
TProfiler.BeginFirstSample(inst.GetType().FullName);
inst.Update();
TProfiler.EndFirstSample();
}
}
public override void OnLateUpdate()
{
var listLateUpdate = _listLateUpdate;
var listLateUpdateCnt = listLateUpdate.Count;
for (int i = 0; i < listLateUpdateCnt; i++)
{
var inst = listLateUpdate[i];
TProfiler.BeginFirstSample(inst.GetType().FullName);
inst.LateUpdate();
TProfiler.EndFirstSample();
}
}
public override void OnFixedUpdate()
{
var listFixedUpdate = _listFixedUpdate;
var listFixedUpdateCnt = listFixedUpdate.Count;
for (int i = 0; i < listFixedUpdateCnt; i++)
{
var inst = listFixedUpdate[i];
TProfiler.BeginFirstSample(inst.GetType().FullName);
inst.FixedUpdate();
TProfiler.EndFirstSample();
}
}
public override void OnDestroy()
{
for (int i = 0; i < _listInst.Count; i++)
{
var inst = _listInst[i];
inst.Destroy();
}
}
public override void OnApplicationPause(bool pause)
{
for (int i = 0; i < _listInst.Count; i++)
{
var inst = _listInst[i];
if (pause)
{
inst.OnPause();
}
else
{
inst.OnResume();
}
}
}
public override void OnDrawGizmos()
{
for (int i = 0; i < _listInst.Count; i++)
{
var inst = _listInst[i];
inst.OnDrawGizmos();
}
}
private bool HadAttribute<T>(Type type) where T:Attribute
{
T attribute = Attribute.GetCustomAttribute(type, typeof(T)) as T;
return attribute != null;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5c0e9c1c8c9d4ce99a1c991fb62a0256
timeCreated: 1683120460

View File

@@ -0,0 +1,16 @@
{
"name": "GameBase",
"rootNamespace": "GameBase",
"references": [
"GUID:aa06d4cc755c979489c256c1bcca1dfb"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 08c3762f54316454ca6b6fbcb22b40e5
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b062b3e32edd4536a4308a3d180842e0
timeCreated: 1681989133

View File

@@ -0,0 +1,40 @@
using TEngine;
namespace GameBase
{
/// <summary>
/// 用来在多线程下检测耗时。
/// </summary>
public class GameTickWatcher
{
private long _startTick;
public GameTickWatcher()
{
Refresh();
}
public void Refresh()
{
_startTick = System.DateTime.Now.Ticks;
}
/// <summary>
/// 获取用时。
/// </summary>
/// <returns></returns>
public float ElapseTime()
{
long endTick = System.DateTime.Now.Ticks;
return (float)((endTick - _startTick) / 10000) / 1000.0f;
}
/// <summary>
/// 输出用时。
/// </summary>
public void LogUsedTime()
{
Log.Info($"Used Time: {this.ElapseTime()}");
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7320165f7aa147a998a30fe2f7a5a5c2
timeCreated: 1681989139

View File

@@ -0,0 +1,58 @@
/// <summary>
/// 定义通用的逻辑接口,统一生命期调用
/// </summary>
public interface ILogicSys
{
/// <summary>
/// 初始化接口
/// </summary>
/// <returns></returns>
bool OnInit();
/// <summary>
/// 销毁系统
/// </summary>
void OnDestroy();
/// <summary>
/// 初始化后,第一帧统一调用
/// </summary>
void OnStart();
/// <summary>
/// 更新接口
/// </summary>
/// <returns></returns>
void OnUpdate();
/// <summary>
/// 渲染后调用
/// </summary>
void OnLateUpdate();
/// <summary>
/// 物理帧更新
/// </summary>
void OnFixedUpdate();
/// <summary>
/// 登录账号/角色时调用
/// </summary>
void OnRoleLogin();
/// <summary>
/// 清理数据接口,切换账号/角色时调用
/// </summary>
void OnRoleLogout();
/// <summary>
/// 绘制调试接口
/// </summary>
void OnDrawGizmos();
/// <summary>
/// 暂停游戏
/// </summary>
/// <param name="pause"></param>
void OnApplicationPause(bool pause);
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 63ff6535a43f41d7ac793b8a153a37b6
timeCreated: 1681213932

View File

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

View File

@@ -0,0 +1,190 @@
using UnityEngine;
using System.Collections.Generic;
using System;
using System.Threading;
using System.Linq;
/*******************************************************************************
//开启一个Loom进程
Loom.RunAsync(() =>
{
aucThread = new Thread(ReceiveMsg);
aucThread.Start();
}
//进程调用主线程方法
MainPack pack = (MainPack)MainPack.Descriptor.Parser.ParseFrom(buffer, 0, len);
Loom.QueueOnMainThread((param) =>
{
UdpHandleResponse(pack);
}, null);
*******************************************************************************/
namespace GameBase
{
/// <summary>
/// Loom多线程通信。
/// <remarks></remarks>
/// </summary>
public class Loom : MonoBehaviour
{
public Dictionary<string, CancellationTokenSource> TokenSourcesDictionary = new Dictionary<string, CancellationTokenSource>();
private static readonly int MaxThreads = 8;
private static int _numThreads;
private static Loom _current;
public static Loom Current
{
get
{
Initialize();
return _current;
}
}
public void Awake()
{
_current = this;
_initialized = true;
}
protected void OnDestroy()
{
}
private static bool _initialized;
private static void Initialize()
{
if (!_initialized)
{
if (!Application.isPlaying)
{
return;
}
_initialized = true;
var obj = new GameObject("[Loom]");
_current = obj.AddComponent<Loom>();
DontDestroyOnLoad(obj);
}
}
public struct NoDelayedQueueItem
{
public Action<object> Action;
public object Param;
}
private readonly List<NoDelayedQueueItem> _actions = new List<NoDelayedQueueItem>();
public struct DelayedQueueItem
{
public float Time;
public Action<object> Action;
public object Param;
}
private readonly List<DelayedQueueItem> _delayed = new List<DelayedQueueItem>();
private readonly List<DelayedQueueItem> _currentDelayed = new List<DelayedQueueItem>();
public static void QueueOnMainThread(Action<object> taction, object param, float time = 0f)
{
if (time != 0f)
{
lock (Current._delayed)
{
Current._delayed.Add(new DelayedQueueItem { Time = Time.time + time, Action = taction, Param = param });
}
}
else
{
lock (Current._actions)
{
Current._actions.Add(new NoDelayedQueueItem { Action = taction, Param = param });
}
}
}
public static Thread RunAsync(Action action)
{
Initialize();
while (_numThreads >= MaxThreads)
{
Thread.Sleep(100);
}
Interlocked.Increment(ref _numThreads);
ThreadPool.QueueUserWorkItem(RunAction, action);
return null;
}
private static void RunAction(object action)
{
try
{
((Action)action)();
}
catch
{
// ignored
}
finally
{
Interlocked.Decrement(ref _numThreads);
}
}
void OnDisable()
{
if (_current == this)
{
_current = null;
}
}
private readonly List<NoDelayedQueueItem> _currentActions = new List<NoDelayedQueueItem>();
void Update()
{
if (_actions.Count > 0)
{
lock (_actions)
{
_currentActions.Clear();
_currentActions.AddRange(_actions);
_actions.Clear();
}
for (int i = 0; i < _currentActions.Count; i++)
{
_currentActions[i].Action(_currentActions[i].Param);
}
}
if (_delayed.Count > 0)
{
lock (_delayed)
{
_currentDelayed.Clear();
_currentDelayed.AddRange(_delayed.Where(d => d.Time <= Time.time));
for (int i = 0; i < _currentDelayed.Count; i++)
{
_delayed.Remove(_currentDelayed[i]);
}
}
for (int i = 0; i < _currentDelayed.Count; i++)
{
_currentDelayed[i].Action(_currentDelayed[i].Param);
}
}
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b87f840d1d0b8a14799b0eee6f0fabae
guid: eea4adc555e37f842abf5dd24c191d93
MonoImporter:
externalObjects: {}
serializedVersion: 2

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 464445719fff48a78021df4a4a6b05a5
timeCreated: 1684552621

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 00565f0d362f4c36836804455e19c3df
timeCreated: 1681990210

View File

@@ -0,0 +1,27 @@
using TEngine;
namespace GameBase
{
/// <summary>
/// 通用单例。
/// </summary>
/// <typeparam name="T">泛型T。</typeparam>
public class Singleton<T> where T : new()
{
private static T _instance;
public static T Instance
{
get
{
if (null == _instance)
{
_instance = new T();
Log.Assert(_instance != null);
}
return _instance;
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b68a449df312429cbb27873984ec238e
timeCreated: 1681214042

View File

@@ -0,0 +1,214 @@
using System.Collections.Generic;
using TEngine;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace GameBase
{
/// <summary>
/// 单例接口。
/// </summary>
public interface ISingleton
{
void Active();
void Release();
}
/// <summary>
/// 单例管理器(统一化持久和释放)。
/// </summary>
public static class SingletonMgr
{
private static List<ISingleton> _singletonList;
private static Dictionary<string, GameObject> _gameObjects;
private static GameObject _root;
public static GameObject Root
{
get
{
if (_root == null)
{
_root = GameObject.Find("[GameModule]");
if (_root == null)
{
_root = new GameObject("[GameModule]")
{
transform =
{
position = Vector3.zero
}
};
}
Object.DontDestroyOnLoad(_root);
}
return _root;
}
}
public static void Retain(ISingleton go)
{
if (_singletonList == null)
{
_singletonList = new List<ISingleton>();
}
_singletonList.Add(go);
}
public static void Retain(GameObject go)
{
if (_gameObjects == null)
{
_gameObjects = new Dictionary<string, GameObject>();
}
if (!_gameObjects.ContainsKey(go.name))
{
_gameObjects.Add(go.name, go);
if (Application.isPlaying)
{
Object.DontDestroyOnLoad(go);
}
}
}
public static void Release(GameObject go)
{
if (_gameObjects != null && _gameObjects.ContainsKey(go.name))
{
_gameObjects.Remove(go.name);
Object.Destroy(go);
}
}
public static void Release(ISingleton go)
{
if (_singletonList != null && _singletonList.Contains(go))
{
_singletonList.Remove(go);
}
}
public static void Release()
{
if (_gameObjects != null)
{
foreach (var item in _gameObjects)
{
UnityEngine.Object.Destroy(item.Value);
}
_gameObjects.Clear();
}
if (_singletonList != null)
{
for (int i = 0; i < _singletonList.Count; ++i)
{
_singletonList[i].Release();
}
_singletonList.Clear();
}
Resources.UnloadUnusedAssets();
}
public static GameObject GetGameObject(string name)
{
GameObject go = null;
if (_gameObjects != null)
{
_gameObjects.TryGetValue(name, out go);
}
return go;
}
internal static bool ContainsKey(string name)
{
if (_gameObjects != null)
{
return _gameObjects.ContainsKey(name);
}
return false;
}
internal static ISingleton GetSingleton(string name)
{
for (int i = 0; i < _singletonList.Count; ++i)
{
if (_singletonList[i].ToString() == name)
{
return _singletonList[i];
}
}
return null;
}
/// <summary>
/// 释放所有单例。
/// </summary>
public static void ReStart()
{
Release();
SceneManager.LoadScene(0);
}
}
/// <summary>
/// 全局单例对象(非线程安全)。
/// </summary>
/// <typeparam name="T">泛型T。</typeparam>
public abstract class TSingleton<T> : ISingleton where T : TSingleton<T>, new()
{
private static T _instance;
public static T Instance
{
get
{
if (null == _instance)
{
_instance = new T();
_instance.Init();
#if UNITY_EDITOR
Log.Info($"TSingleton Instance:{typeof(T).Name}");
#endif
SingletonMgr.Retain(_instance);
}
return _instance;
}
}
public static bool IsValid => _instance != null;
protected TSingleton()
{
}
protected virtual void Init()
{
}
public virtual void Active()
{
}
public virtual void Release()
{
if (_instance != null)
{
SingletonMgr.Release(_instance);
_instance = null;
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: aa2cb5bb622045d7a6f2a4c4faea3ca6
timeCreated: 1681989590

View File

@@ -0,0 +1,114 @@
using TEngine;
using UnityEngine;
namespace GameBase
{
/// <summary>
/// 具备Unity完整生命周期的单例。
/// </summary>
/// <typeparam name="T"></typeparam>
public abstract class UnitySingleton<T> : MonoBehaviour where T : MonoBehaviour
{
private static T _instance;
public static T Instance
{
get
{
if (_instance == null)
{
var ins = FindObjectOfType<T>();
if (ins != null)
{
var obj = ins.gameObject;
obj.name = typeof(T).Name;
_instance = ins;
SingletonMgr.Retain(obj);
return Instance;
}
System.Type thisType = typeof(T);
string instName = thisType.Name;
GameObject go = SingletonMgr.GetGameObject(instName);
if (go == null)
{
go = GameObject.Find($"[{instName}]");
if (go == null)
{
go = new GameObject($"[{instName}]")
{
transform =
{
position = Vector3.zero
}
};
}
}
_instance = go.GetComponent<T>();
if (_instance == null)
{
_instance = go.AddComponent<T>();
}
if (_instance == null)
{
Log.Error($"Can't create UnitySingleton<{typeof(T)}>");
}
}
return _instance;
}
}
public static T Active()
{
return Instance;
}
public static bool IsValid => _instance != null;
private bool CheckInstance()
{
if (this == Instance)
{
return true;
}
GameObject.Destroy(gameObject);
return false;
}
protected virtual void OnLoad()
{
}
public virtual void Awake()
{
if (CheckInstance())
{
OnLoad();
}
#if UNITY_EDITOR
Log.Debug($"UnitySingleton Instance:{typeof(T).Name}");
#endif
GameObject tEngine = SingletonMgr.Root;
if (tEngine != null)
{
this.gameObject.transform.SetParent(tEngine.transform);
}
}
protected virtual void OnDestroy()
{
Release();
}
public static void Release()
{
if (_instance == null) return;
SingletonMgr.Release(_instance.gameObject);
_instance = null;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 25c99243aa534df5870e36fdf9d36afd
timeCreated: 1681990223

View File

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

View File

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

View File

@@ -0,0 +1,24 @@
using TEngine;
using UnityEngine;
#if ENABLE_URP
using UnityEngine.Rendering.Universal;
#endif
namespace GameLogic
{
public class CameraUtils
{
public static void AddCameraStack(Camera camera,Camera mainCamera)
{
#if ENABLE_URP
if (mainCamera != null)
{
// 通过脚本的方式,只要能找到 camera 不轮是否跨 base 相机的场景,都可以 Add 进 Stack
mainCamera.GetComponent<UniversalAdditionalCameraData>().cameraStack.Add(GameModule.UI.UICamera);
}
#else
Log.Fatal("Could not add camera stack because had no URP-Render-Pip");
#endif
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6375b5490bbdcc145a24706a6c4e9cb7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,162 @@
using GameBase;
using TEngine;
public partial class GameApp:Singleton<GameApp>
{
/// <summary>
/// 热更域App主入口。
/// </summary>
/// <param name="objects"></param>
public static void Entrance(object[] objects)
{
Log.Warning("======= 看到此条日志代表你成功运行了热更新代码 =======");
Log.Warning("======= Entrance GameApp =======");
Instance.Init();
Instance.Start();
Utility.Unity.AddUpdateListener(Instance.Update);
Utility.Unity.AddFixedUpdateListener(Instance.FixedUpdate);
Utility.Unity.AddLateUpdateListener(Instance.LateUpdate);
Utility.Unity.AddDestroyListener(Instance.OnDestroy);
Utility.Unity.AddOnDrawGizmosListener(Instance.OnDrawGizmos);
Utility.Unity.AddOnApplicationPauseListener(Instance.OnApplicationPause);
Instance.StartGameLogic();
}
/// <summary>
/// 开始游戏业务层逻辑。
/// <remarks>显示UI、加载场景等。</remarks>
/// </summary>
private void StartGameLogic()
{
}
/// <summary>
/// 关闭游戏。
/// </summary>
/// <param name="shutdownType">关闭游戏框架类型。</param>
public static void Shutdown(ShutdownType shutdownType)
{
if (shutdownType == ShutdownType.None)
{
return;
}
if (shutdownType == ShutdownType.Restart)
{
Utility.Unity.RemoveUpdateListener(Instance.Update);
Utility.Unity.RemoveFixedUpdateListener(Instance.FixedUpdate);
Utility.Unity.RemoveLateUpdateListener(Instance.LateUpdate);
Utility.Unity.RemoveDestroyListener(Instance.OnDestroy);
Utility.Unity.RemoveOnDrawGizmosListener(Instance.OnDrawGizmos);
Utility.Unity.RemoveOnApplicationPauseListener(Instance.OnApplicationPause);
return;
}
if (shutdownType == ShutdownType.Quit)
{
UnityEngine.Application.Quit();
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#endif
}
}
private void Start()
{
GameTime.StartFrame();
var listLogic = _listLogicMgr;
var logicCnt = listLogic.Count;
for (int i = 0; i < logicCnt; i++)
{
var logic = listLogic[i];
logic.OnStart();
}
}
private void Update()
{
GameTime.StartFrame();
TProfiler.BeginFirstSample("Update");
var listLogic = _listLogicMgr;
var logicCnt = listLogic.Count;
for (int i = 0; i < logicCnt; i++)
{
var logic = listLogic[i];
TProfiler.BeginSample(logic.GetType().FullName);
logic.OnUpdate();
TProfiler.EndSample();
}
TProfiler.EndFirstSample();
}
private void FixedUpdate()
{
GameTime.StartFrame();
TProfiler.BeginFirstSample("FixedUpdate");
var listLogic = _listLogicMgr;
var logicCnt = listLogic.Count;
for (int i = 0; i < logicCnt; i++)
{
var logic = listLogic[i];
TProfiler.BeginSample(logic.GetType().FullName);
logic.OnFixedUpdate();
TProfiler.EndSample();
}
TProfiler.EndFirstSample();
}
private void LateUpdate()
{
GameTime.StartFrame();
TProfiler.BeginFirstSample("LateUpdate");
var listLogic = _listLogicMgr;
var logicCnt = listLogic.Count;
for (int i = 0; i < logicCnt; i++)
{
var logic = listLogic[i];
TProfiler.BeginSample(logic.GetType().FullName);
logic.OnLateUpdate();
TProfiler.EndSample();
}
TProfiler.EndFirstSample();
}
private void OnDestroy()
{
GameTime.StartFrame();
var listLogic = _listLogicMgr;
var logicCnt = listLogic.Count;
for (int i = 0; i < logicCnt; i++)
{
var logic = listLogic[i];
logic.OnDestroy();
}
}
private void OnDrawGizmos()
{
#if UNITY_EDITOR
GameTime.StartFrame();
var listLogic = _listLogicMgr;
var logicCnt = listLogic.Count;
for (int i = 0; i < logicCnt; i++)
{
var logic = listLogic[i];
logic.OnDrawGizmos();
}
#endif
}
private void OnApplicationPause(bool isPause)
{
var listLogic = _listLogicMgr;
var logicCnt = listLogic.Count;
for (int i = 0; i < logicCnt; i++)
{
var logic = listLogic[i];
logic.OnApplicationPause(isPause);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b5fabb458720ae14bbdb4d781d4ef34e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,55 @@
using System.Collections.Generic;
using TEngine;
public partial class GameApp
{
private List<ILogicSys> _listLogicMgr;
private void Init()
{
_listLogicMgr = new List<ILogicSys>();
RegisterAllSystem();
InitSystemSetting();
}
/// <summary>
/// 设置一些通用的系统属性。
/// </summary>
private void InitSystemSetting()
{
}
/// <summary>
/// 注册所有逻辑系统
/// </summary>
private void RegisterAllSystem()
{
//带生命周期的单例系统。
AddLogicSys(BehaviourSingleSystem.Instance);
}
/// <summary>
/// 注册逻辑系统。
/// </summary>
/// <param name="logicSys">ILogicSys</param>
/// <returns></returns>
protected bool AddLogicSys(ILogicSys logicSys)
{
if (_listLogicMgr.Contains(logicSys))
{
Log.Fatal("Repeat add logic system: {0}", logicSys.GetType().Name);
return false;
}
if (!logicSys.OnInit())
{
Log.Fatal("{0} Init failed", logicSys.GetType().Name);
return false;
}
_listLogicMgr.Add(logicSys);
return true;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4703541a565f5ec4bb35edd81c28958c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,27 @@
{
"name": "GameLogic",
"rootNamespace": "GameLogic",
"references": [
"GUID:08c3762f54316454ca6b6fbcb22b40e5",
"GUID:a90b2d3377c5e4a4db95cc44fb82045e",
"GUID:aa06d4cc755c979489c256c1bcca1dfb",
"GUID:641632c4f8079b94f963b5284d859a12",
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:15fc0a57446b3144c949da3e2b9737a9"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.unity.render-pipelines.universal",
"expression": "",
"define": "ENABLE_URP"
}
],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: acd6baa97ba40d3478c29cd9c76ff9e3
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 145b951be40d41dea06e76bd967a5d15
timeCreated: 1682045847

View File

@@ -0,0 +1,166 @@
using TEngine;
namespace GameLogic
{
public enum ClientConnectWatcherStatus
{
StatusInit,
StatusReconnectAuto,
StatusReconnectConfirm,
StatusWaitExit
}
public class ClientConnectWatcher
{
private readonly GameClient _client;
private ClientConnectWatcherStatus _status;
private float _statusTime;
private int _reconnectCnt = 0;
private int _disconnectReason = 0;
private bool _enable = false;
public bool Enable
{
get => _enable;
set
{
if (_enable != value)
{
_enable = value;
if (_enable)
{
OnEnable();
}
else
{
OnDisable();
}
}
}
}
private ClientConnectWatcherStatus Status
{
get => _status;
set
{
if (_status == value) return;
_status = value;
_statusTime = NowTime;
}
}
private float NowTime => GameTime.unscaledTime;
public ClientConnectWatcher(GameClient client)
{
_client = client;
_statusTime = NowTime;
_status = ClientConnectWatcherStatus.StatusInit;
}
public void Update()
{
if (!_enable)
{
return;
}
if (_client.IsEntered)
{
return;
}
switch (_status)
{
case ClientConnectWatcherStatus.StatusInit:
UpdateOnInitStatus();
break;
case ClientConnectWatcherStatus.StatusReconnectAuto:
UpdateOnReconnectAuto();
break;
case ClientConnectWatcherStatus.StatusReconnectConfirm:
UpdateOnReconnectConfirm();
break;
case ClientConnectWatcherStatus.StatusWaitExit:
UpdateOnWaitExit();
break;
}
}
public void OnReConnect()
{
if (_status == ClientConnectWatcherStatus.StatusReconnectConfirm)
{
Status = ClientConnectWatcherStatus.StatusReconnectAuto;
}
}
void UpdateOnInitStatus()
{
int autoReconnectMaxCount = 4;
if (_reconnectCnt <= autoReconnectMaxCount)
{
if (_reconnectCnt == 0)
{
_disconnectReason = _client.LastNetErrCode;
}
Status = ClientConnectWatcherStatus.StatusReconnectAuto;
_reconnectCnt++;
//重连
_client.Reconnect();
}
else
{
Status = ClientConnectWatcherStatus.StatusReconnectConfirm;
_reconnectCnt++;
// UISys.Mgr.ShowUI(GAME_UI_TYPE.Tip_NetDisconn, UISys.Mgr.GetUIWindowParam().SetParam("errCode", m_disconnectReason));
}
}
void UpdateOnReconnectAuto()
{
if (_client.IsEntered)
{
Status = ClientConnectWatcherStatus.StatusInit;
_reconnectCnt = 0;
return;
}
float nowTime = NowTime;
var timeoutTime = 10f;
if (_statusTime + timeoutTime < nowTime)
{
Log.Error("UpdateOnReconnectAuto timeout: {0}", timeoutTime);
//切换到默认的,下一帧继续判断是否需要自动还是手动
Status = ClientConnectWatcherStatus.StatusInit;
}
}
void UpdateOnReconnectConfirm()
{
}
void UpdateOnWaitExit()
{
}
private void OnDisable()
{
Status = ClientConnectWatcherStatus.StatusInit;
_reconnectCnt = 0;
}
private void OnEnable()
{
Status = ClientConnectWatcherStatus.StatusInit;
_reconnectCnt = 0;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3e4e637f3da340dd9512150c3e2ff087
timeCreated: 1684334948

View File

@@ -0,0 +1,428 @@
using System.Net.Sockets;
using GameBase;
using GameProto;
using TEngine;
using CSPkg = GameProto.CSPkg;
namespace GameLogic
{
public enum GameClientStatus
{
StatusInit, //初始化
StatusReconnect, //重新连接
StatusClose, //断开连接
StatusLogin, //登录中
StatusEnter, //AccountLogin成功进入服务器了
}
public enum CsMsgResult
{
NoError = 0,
NetworkError = 1,
InternalError = 2,
MsgTimeOut = 3,
PingTimeOut = 4,
}
//定义消息回报的回调接口
public delegate void CsMsgDelegate(CsMsgResult result, CSPkg msg);
/// <summary>
/// 统计网络协议的接口
/// </summary>
public delegate void CsMsgStatDelegate(int cmdID, int pkgSize);
public class GameClient : Singleton<GameClient>
{
private readonly INetworkChannel _channel;
private GameClientStatus _status = GameClientStatus.StatusInit;
private readonly MsgDispatcher _dispatcher;
private readonly ClientConnectWatcher _connectWatcher;
private float _lastLogDisconnectErrTime = 0f;
private int _lastNetErrCode = 0;
public int LastNetErrCode => _lastNetErrCode;
public GameClientStatus Status
{
get => _status;
set => _status = value;
}
public bool IsEntered => _status == GameClientStatus.StatusEnter;
/// <summary>
/// 连续心跳超时
/// </summary>
private int _heatBeatTimeoutNum = 0;
private int _ping = -1;
private float NowTime => GameTime.unscaledTime;
private string _lastHost = null;
private int _lastPort = 0;
public GameClient()
{
_connectWatcher = new ClientConnectWatcher(this);
_dispatcher = new MsgDispatcher();
_dispatcher.SetTimeout(5f);
GameEvent.AddEventListener<INetworkChannel,object>(NetworkEvent.NetworkConnectedEvent,OnNetworkConnected);
GameEvent.AddEventListener<INetworkChannel>(NetworkEvent.NetworkClosedEvent,OnNetworkClosed);
GameEvent.AddEventListener<INetworkChannel,NetworkErrorCode,SocketError,string>(NetworkEvent.NetworkErrorEvent,OnNetworkError);
GameEvent.AddEventListener<INetworkChannel,object>(NetworkEvent.NetworkCustomErrorEvent,OnNetworkCustomError);
_channel = Network.Instance.CreateNetworkChannel("GameClient", ServiceType.Tcp, new NetworkChannelHelper());
}
private void OnNetworkConnected(INetworkChannel channel, object userdata)
{
bool isReconnect = (_status == GameClientStatus.StatusReconnect);
//准备登录
Status = GameClientStatus.StatusLogin;
OnServerConnected(isReconnect);
}
private void OnNetworkClosed(INetworkChannel channel)
{
}
private void OnNetworkError(INetworkChannel channel, NetworkErrorCode networkErrorCode, SocketError socketError, string errorMessage)
{
}
private void OnNetworkCustomError(INetworkChannel channel, object userData)
{
}
public void Connect(string host, int port, bool reconnect = false)
{
ResetParam();
if (!reconnect)
{
SetWatchReconnect(false);
}
if (reconnect)
{
// GameEvent.Get<ICommUI>().ShowWaitUITip(WaitUISeq.LOGINWORLD_SEQID, G.R(TextDefine.ID_TIPS_RECONNECTING));
}
else
{
// GameEvent.Get<ICommUI>().ShowWaitUI(WaitUISeq.LOGINWORLD_SEQID);
}
_lastHost = host;
_lastPort = port;
Status = reconnect ? GameClientStatus.StatusReconnect : GameClientStatus.StatusInit;
_channel.Connect(host, port);
}
public void Reconnect()
{
if (string.IsNullOrEmpty(_lastHost) || _lastPort <= 0)
{
// GameModule.UI.ShowTipMsg("Invalid reconnect param");
return;
}
_connectWatcher.OnReConnect();
Connect(_lastHost, _lastPort, true);
}
public void Shutdown()
{
_channel.Close();
_status = GameClientStatus.StatusInit;
}
public void OnServerConnected(bool isReconnect)
{
}
public bool SendCsMsg(CSPkg reqPkg)
{
if (!IsStatusCanSendMsg(reqPkg.Head.MsgId))
{
return false;
}
return DoSendData(reqPkg);
}
public bool IsStatusCanSendMsg(uint msgId)
{
bool canSend = false;
if (_status == GameClientStatus.StatusLogin)
{
canSend = (msgId == (uint)CSMsgID.CsCmdActLoginReq);
}
if (_status == GameClientStatus.StatusEnter)
{
canSend = true;
}
if (!canSend)
{
float nowTime = NowTime;
if (_lastLogDisconnectErrTime + 5 < nowTime)
{
Log.Error("GameClient not connected, send msg failed, msgId[{0}]", msgId);
_lastLogDisconnectErrTime = nowTime;
}
//UISys.Mgr.ShowTipMsg(TextDefine.ID_ERR_NETWORKD_DISCONNECT);
}
return canSend;
}
public bool SendCsMsg(CSPkg reqPkg, uint resCmd, CsMsgDelegate resHandler = null, bool needShowWaitUI = true)
{
if (!IsStatusCanSendMsg(reqPkg.Head.MsgId))
{
return false;
}
var ret = DoSendData(reqPkg);
if (!ret)
{
if (resHandler != null)
{
resHandler(CsMsgResult.InternalError, null);
}
_dispatcher.NotifyCmdError(resCmd, CsMsgResult.InternalError);
}
else
{
//注册消息
if (resHandler != null)
{
_dispatcher.RegSeqHandle(reqPkg.Head.Echo, resCmd, resHandler);
if (reqPkg.Head.Echo > 0 && IsWaitingCmd(resCmd) && needShowWaitUI)
{
// TODO
// GameEvent.Get<ICommUI>().ShowWaitUI(reqPkg.Head.Echo);
}
}
}
return ret;
}
private bool DoSendData(CSPkg reqPkg)
{
if (!IsIgnoreLog(reqPkg.Head.MsgId))
{
Log.Debug("[c-s] CmdId[{0}]\n{1}", reqPkg.Head.MsgId, reqPkg.Body.ToString());
}
var sendRet = _channel.Send(reqPkg);
return sendRet;
}
private bool IsIgnoreLog(uint msgId)
{
bool ignoreLog = false;
switch (msgId)
{
case (uint)CSMsgID.CsCmdHeatbeatReq:
case (uint)CSMsgID.CsCmdHeatbeatRes:
ignoreLog = true;
break;
}
return ignoreLog;
}
public static bool IsWaitingCmd(uint msgId)
{
//心跳包不需要读条等待
if (msgId == (uint)CSMsgID.CsCmdHeatbeatRes)
{
return false;
}
return true;
}
private void ResetParam()
{
_lastLogDisconnectErrTime = 0f;
_heatBeatTimeoutNum = 0;
_lastHbTime = 0f;
_ping = -1;
_lastNetErrCode = 0;
}
public void OnUpdate()
{
_dispatcher.Update();
TickHeartBeat();
CheckHeatBeatTimeout();
_connectWatcher.Update();
}
/// <summary>
/// 注册静态消息
/// </summary>
/// <param name="iCmdID"></param>
/// <param name="msgDelegate"></param>
public void RegCmdHandle(int iCmdID, CsMsgDelegate msgDelegate)
{
_dispatcher.RegCmdHandle((uint)iCmdID, msgDelegate);
}
/// <summary>
/// 移除消息处理函数
/// </summary>
/// <param name="cmdId"></param>
/// <param name="msgDelegate"></param>
public void RmvCmdHandle(int cmdId, CsMsgDelegate msgDelegate)
{
_dispatcher.RmvCmdHandle((uint)cmdId, msgDelegate);
}
/// <summary>
/// 设置加密密钥
/// </summary>
/// <param name="key"></param>
public void SetEncryptKey(string key)
{
}
/// <summary>
/// 设置是否需要监控网络重连。
/// 登录成功后,开启监控,可以自动重连或者提示玩家重连。
/// </summary>
/// <param name="needWatch"></param>
public void SetWatchReconnect(bool needWatch)
{
_connectWatcher.Enable = needWatch;
}
public bool IsNetworkOkAndLogin()
{
return _status == GameClientStatus.StatusEnter;
}
#region
/// <summary>
/// 最近一次心跳的时间
/// </summary>
private float _lastHbTime = 0f;
/// <summary>
/// 心跳间隔
/// </summary>
private readonly float _heartBeatDurTime = 5;
/// <summary>
/// 心跳超时的最大次数
/// </summary>
private const int HeatBeatTimeoutMaxCount = 2;
private bool CheckHeatBeatTimeout()
{
if (_heatBeatTimeoutNum >= HeatBeatTimeoutMaxCount)
{
//断开连接
Shutdown();
//准备重连
_heatBeatTimeoutNum = 0;
Status = GameClientStatus.StatusClose;
Log.Error("heat beat detect timeout");
return false;
}
return true;
}
void TickHeartBeat()
{
if (Status != GameClientStatus.StatusEnter)
{
return;
}
var nowTime = NowTime;
if (_lastHbTime + _heartBeatDurTime < nowTime)
{
_lastHbTime = nowTime;
CSPkg heatPkg = ProtobufUtility.BuildCsMsg((int)CSMsgID.CsCmdHeatbeatReq);
heatPkg.Body.HeatBeatReq = new CSHeatBeatReq { HeatEchoTime = _lastHbTime };
SendCsMsg(heatPkg, (int)CSMsgID.CsCmdHeatbeatRes, HandleHeatBeatRes);
}
}
void HandleHeatBeatRes(CsMsgResult result, CSPkg msg)
{
if (result != CsMsgResult.NoError)
{
//如果是超时了,则标记最近收到包的次数
if (result == CsMsgResult.MsgTimeOut)
{
_heatBeatTimeoutNum++;
Log.Warning("heat beat timeout: {0}", _heatBeatTimeoutNum);
}
}
else
{
var resBody = msg.Body.HeatBeatRes;
float diffTime = NowTime - resBody.HeatEchoTime;
_ping = (int)(diffTime * 1000);
_heatBeatTimeoutNum = 0;
}
}
#endregion
#region Ping值
/// <summary>
/// ping值
/// </summary>
public int Ping
{
get
{
if (IsPingValid())
{
return _ping / 4;
}
else
{
return 0;
}
}
}
public bool IsPingValid()
{
if (IsNetworkOkAndLogin())
{
return _ping >= 0;
}
return false;
}
#endregion
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8c5441725c9f4d98a7790dc76a6a0c48
timeCreated: 1684331687

View File

@@ -0,0 +1,265 @@
using System;
using System.Collections.Generic;
using GameProto;
using TEngine;
using CSPkg = GameProto.CSPkg;
namespace GameLogic
{
internal class MsgHandleDataToRmv
{
public uint MsgId;
public CsMsgDelegate Handle;
};
class MsgDispatcher
{
const int CheckTimeoutPerframe = 10;
const int MaxMsgHandle = 256;
private readonly CsMsgDelegate[] _aMsgHandles = new CsMsgDelegate[MaxMsgHandle];
private readonly float[] _fMsgRegTime = new float[MaxMsgHandle];
private readonly UInt32[] _adwMsgRegSeq = new UInt32[MaxMsgHandle]; //因为_aiMsgRegResCmdID存储的是hash不能保证一定seqid一样所以这儿存储下用来校验
private readonly uint[] _aiMsgRegResCmdID = new uint[MaxMsgHandle];
UInt32 _dwLastCheckIndex = 0;
private readonly Dictionary<uint, List<CsMsgDelegate>> _mapCmdHandle = new Dictionary<uint, List<CsMsgDelegate>>();
private readonly List<CsMsgStatDelegate> _listStatHandle = new List<CsMsgStatDelegate>();
//防止在处理消息的时候又删除了消息映射,所以这儿加了个队列来做个保护
private readonly List<MsgHandleDataToRmv> _rmvList = new List<MsgHandleDataToRmv>();
private bool _isInHandleLoop = false;
private float _timeout = 5;
// 清理所有的网络消息
public void CleanAllNetMsg()
{
_mapCmdHandle.Clear();
}
public void SetTimeout(float timeout)
{
_timeout = timeout;
}
public void RegSeqHandle(UInt32 dwMsgSeqID, uint iResCmdID, CsMsgDelegate msgDelegate)
{
UInt32 hashIndex = dwMsgSeqID % MaxMsgHandle;
if (_aMsgHandles[hashIndex] != null)
{
OnCallSeqHandle(_adwMsgRegSeq[hashIndex], _aiMsgRegResCmdID[hashIndex]);
NotifyTimeout(_aMsgHandles[hashIndex]);
RmvReg((int)hashIndex);
}
_aMsgHandles[hashIndex] = msgDelegate;
_fMsgRegTime[hashIndex] = NowTime;
_adwMsgRegSeq[hashIndex] = dwMsgSeqID;
_aiMsgRegResCmdID[hashIndex] = iResCmdID;
}
public void RegCmdHandle(uint iCmdID, CsMsgDelegate msgDelegate)
{
if (!_mapCmdHandle.TryGetValue(iCmdID, out var listHandle))
{
listHandle = new List<CsMsgDelegate>();
_mapCmdHandle[iCmdID] = listHandle;
}
if (listHandle != null)
{
if (listHandle.Contains(msgDelegate))
{
Log.Error("-------------repeat RegCmdHandle:{0}-----------", iCmdID);
}
listHandle.Add(msgDelegate);
}
}
/// <summary>
/// 注册统计处理接口
/// </summary>
/// <param name="handler"></param>
public void RegCmdStatHandle(CsMsgStatDelegate handler)
{
_listStatHandle.Add(handler);
}
public void DispatchCmdStat(int cmdID, int pkgSize)
{
foreach (CsMsgStatDelegate handle in _listStatHandle)
{
handle(cmdID, pkgSize);
}
}
public void RmvCmdHandle(uint iCmdID, CsMsgDelegate msgDelegate)
{
if (_isInHandleLoop)
{
MsgHandleDataToRmv toRmvData = new MsgHandleDataToRmv();
toRmvData.MsgId = iCmdID;
toRmvData.Handle = msgDelegate;
_rmvList.Add(toRmvData);
return;
}
if (!_mapCmdHandle.TryGetValue(iCmdID, out var listHandle))
{
return;
}
if (listHandle != null)
{
listHandle.Remove(msgDelegate);
}
}
public void NotifyCmdError(uint iCmdID, CsMsgResult result)
{
NotifyCmdHandle(iCmdID, result, default(CSPkg));
}
protected bool NotifyCmdHandle(uint cmdID, CsMsgResult result, CSPkg pkg)
{
bool ret = false;
if (_mapCmdHandle.TryGetValue(cmdID, out var listHandle))
{
_isInHandleLoop = true;
var rmvList = _rmvList;
rmvList.Clear();
foreach (CsMsgDelegate handle in listHandle)
{
ret = true;
TProfiler.BeginSample("handle");
handle(result, pkg);
TProfiler.EndSample();
}
_isInHandleLoop = false;
//再统一删除掉
int rmvCnt = rmvList.Count;
for (int i = 0; i < rmvCnt; i++)
{
var rmvItem = rmvList[i];
Log.Error("-------------remove cmd handle on loop:{0}-----------", rmvItem.MsgId);
RmvCmdHandle(rmvItem.MsgId, rmvItem.Handle);
}
}
return ret;
}
protected void OnCallSeqHandle(UInt32 echoSeq, uint resCmdID)
{
if (echoSeq > 0)
{
// TODO
// GameEvent.Get<ICommUI>().FinWaitUI(echoSeq);
}
}
protected void NotifyTimeout(CsMsgDelegate msgHandler)
{
msgHandler(CsMsgResult.MsgTimeOut, default(CSPkg));
}
public void NotifySeqError(UInt32 dwSeqID, CsMsgResult result)
{
UInt32 hashIndex = dwSeqID % MaxMsgHandle;
//先判断是否有注册的指定消息
if (_aMsgHandles[hashIndex] != null &&
_adwMsgRegSeq[hashIndex] == dwSeqID)
{
OnCallSeqHandle(dwSeqID, _aiMsgRegResCmdID[hashIndex]);
_aMsgHandles[hashIndex](result, null);
RmvReg((int)hashIndex);
}
}
public bool IsCmdFilterNoLog(int cmdID)
{
switch (cmdID)
{
case (int)CSMsgID.CsCmdHeatbeatRes:
return true;
default:
break;
}
return false;
}
public void NotifyMsg(CSPkg msg)
{
UInt32 dwSeq = msg.Head.Echo;
UInt32 hashIndex = dwSeq % MaxMsgHandle;
//判断是否有固定的消息处理流程
bool bHaveHandle = NotifyCmdHandle(msg.Head.MsgId, CsMsgResult.NoError, msg);
//再判断是否有注册的指定消息
if (_aMsgHandles[hashIndex] != null &&
_adwMsgRegSeq[hashIndex] == dwSeq &&
_aiMsgRegResCmdID[hashIndex] == (int)msg.Head.MsgId)
{
OnCallSeqHandle(_adwMsgRegSeq[hashIndex], _aiMsgRegResCmdID[hashIndex]);
_aMsgHandles[hashIndex](CsMsgResult.NoError, msg);
RmvReg((int)hashIndex);
bHaveHandle = true;
}
if (!bHaveHandle)
{
Log.Debug("there is no handle for Msg[{0}]", msg.Head.MsgId);
}
}
private float NowTime => GameTime.unscaledTime;
public void Update()
{
CheckTimeOut();
}
/// <summary>
/// 定时检查是否请求超时。
/// </summary>
private void CheckTimeOut()
{
float timeout = _timeout;
float nowTime = NowTime;
for (int i = 0; i < CheckTimeoutPerframe; i++)
{
_dwLastCheckIndex = (_dwLastCheckIndex + 1) % MaxMsgHandle;
if (_aMsgHandles[_dwLastCheckIndex] != null)
{
if (_fMsgRegTime[_dwLastCheckIndex] + timeout < nowTime)
{
Log.Error("msg timeout, resCmdID[{0}], reqSeq[{1}]", _aiMsgRegResCmdID[_dwLastCheckIndex],
_adwMsgRegSeq[_dwLastCheckIndex]);
OnCallSeqHandle(_adwMsgRegSeq[_dwLastCheckIndex], _aiMsgRegResCmdID[_dwLastCheckIndex]);
NotifyTimeout(_aMsgHandles[_dwLastCheckIndex]);
RmvReg((int)_dwLastCheckIndex);
}
}
}
}
public void RmvReg(int index)
{
_aMsgHandles[index] = null;
_adwMsgRegSeq[index] = 0;
_aiMsgRegResCmdID[index] = 0;
_fMsgRegTime[index] = 0;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7d667fb84fed4c5f93a06c464585512f
timeCreated: 1684333223

View File

@@ -0,0 +1,226 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Sockets;
using GameProto;
using Google.Protobuf;
using TEngine;
namespace GameLogic
{
public class NetworkChannelHelper : INetworkChannelHelper, IMemory
{
private readonly Dictionary<int, Type> _serverToClientPacketTypes = new Dictionary<int, Type>();
private readonly MemoryStream _cachedStream = new MemoryStream(1024 * 8);
private INetworkChannel _networkChannel = null;
/// <summary>
/// 获取消息包头长度。
/// <remarks>4。</remarks>
/// </summary>
public int PacketHeaderLength => sizeof(int);
/// <summary>
/// 初始化网络频道辅助器。
/// </summary>
/// <param name="networkChannel">网络频道。</param>
public void Initialize(INetworkChannel networkChannel)
{
_networkChannel = networkChannel;
GameEvent.AddEventListener<INetworkChannel, object>(NetworkEvent.NetworkConnectedEvent, OnNetworkConnected);
GameEvent.AddEventListener<INetworkChannel>(NetworkEvent.NetworkClosedEvent, OnNetworkClosed);
GameEvent.AddEventListener<INetworkChannel, int>(NetworkEvent.NetworkMissHeartBeatEvent, OnNetworkMissHeartBeat);
GameEvent.AddEventListener<INetworkChannel, NetworkErrorCode, SocketError, string>(NetworkEvent.NetworkErrorEvent, OnNetworkError);
GameEvent.AddEventListener<INetworkChannel, object>(NetworkEvent.NetworkCustomErrorEvent, OnNetworkCustomError);
}
/// <summary>
/// 关闭并清理网络频道辅助器。
/// </summary>
public void Shutdown()
{
GameEvent.RemoveEventListener<INetworkChannel, object>(NetworkEvent.NetworkConnectedEvent, OnNetworkConnected);
GameEvent.RemoveEventListener<INetworkChannel>(NetworkEvent.NetworkClosedEvent, OnNetworkClosed);
GameEvent.RemoveEventListener<INetworkChannel, int>(NetworkEvent.NetworkMissHeartBeatEvent, OnNetworkMissHeartBeat);
GameEvent.RemoveEventListener<INetworkChannel, NetworkErrorCode, SocketError, string>(NetworkEvent.NetworkErrorEvent, OnNetworkError);
GameEvent.RemoveEventListener<INetworkChannel, object>(NetworkEvent.NetworkCustomErrorEvent, OnNetworkCustomError);
_networkChannel = null;
}
/// <summary>
/// 准备进行连接。
/// </summary>
public void PrepareForConnecting()
{
_networkChannel.Socket.ReceiveBufferSize = 1024 * 64;
_networkChannel.Socket.SendBufferSize = 1024 * 64;
}
public CSPkg HeartBeatPack = new CSPkg { Head = new CSPkgHead(), Body = new CSPkgBody() };
/// <summary>
/// 发送心跳消息包。
/// </summary>
/// <returns>是否发送心跳消息包成功。</returns>
public bool SendHeartBeat()
{
HeartBeatPack.Head.MsgId = (uint)CSMsgID.CsCmdHeatbeatReq;
_networkChannel.Send(HeartBeatPack);
return true;
}
/// <summary>
/// 序列化消息包。
/// </summary>
/// <typeparam name="T">消息包类型。</typeparam>
/// <param name="packet">要序列化的消息包。</param>
/// <param name="destination">要序列化的目标流。</param>
/// <returns>是否序列化成功。</returns>
public bool Serialize(CSPkg packet, Stream destination)
{
if (packet == null)
{
Log.Warning("Packet is invalid.");
return false;
}
_cachedStream.SetLength(_cachedStream.Capacity); // 此行防止 Array.Copy 的数据无法写入
_cachedStream.Position = 0L;
global::ProtobufUtility.ToStreamWithHead(packet,_cachedStream);
_cachedStream.WriteTo(destination);
return true;
}
/// <summary>
/// 反序列化消息包头。
/// </summary>
/// <param name="source">要反序列化的来源流。</param>
/// <param name="customErrorData">用户自定义错误数据。</param>
/// <returns>反序列化后的消息包头。</returns>
public IPacketHeader DeserializePacketHeader(Stream source, out object customErrorData)
{
// 注意:此函数并不在主线程调用!
customErrorData = null;
PacketHeader packetHeader = MemoryPool.Acquire<PacketHeader>();
packetHeader.PacketLength = ((MemoryStream)source).GetBuffer()[0];
return packetHeader;
}
/// <summary>
/// 反序列化消息包。
/// </summary>
/// <param name="packetHeader">消息包头。</param>
/// <param name="source">要反序列化的来源流。</param>
/// <param name="customErrorData">用户自定义错误数据。</param>
/// <returns>反序列化后的消息包。</returns>
public CSPkg DeserializePacket(IPacketHeader packetHeader, Stream source, out object customErrorData)
{
// 注意:此函数并不在主线程调用!
customErrorData = null;
PacketHeader scPacketHeader = packetHeader as PacketHeader;
if (scPacketHeader == null)
{
Log.Warning("Packet header is invalid.");
return null;
}
CSPkg csPkg = null;
if (scPacketHeader.IsValid)
{
try
{
csPkg = global::ProtobufUtility.Deserialize(((MemoryStream)source).GetBuffer(),0,scPacketHeader.PacketLength);
Log.Debug("[s-c] CmdId[{0}]\n{1}", csPkg.Head.MsgId, csPkg.ToString());
}
catch (Exception e)
{
Log.Warning(e);
}
}
else
{
Log.Warning("Packet header is invalid.");
}
MemoryPool.Release(scPacketHeader);
return csPkg;
}
private Type GetServerToClientPacketType(int id)
{
if (_serverToClientPacketTypes.TryGetValue(id, out var type))
{
return type;
}
return null;
}
private void OnNetworkConnected(INetworkChannel channel, object userdata)
{
if (channel != _networkChannel)
{
return;
}
Log.Info("Network channel '{0}' connected, local address '{1}', remote address '{2}'.",
channel.Name, channel.Socket.LocalEndPoint.ToString(),
channel.Socket.RemoteEndPoint.ToString());
}
private void OnNetworkClosed(INetworkChannel channel)
{
if (channel != _networkChannel)
{
return;
}
Log.Info("Network channel '{0}' closed.", channel.Name);
}
private void OnNetworkMissHeartBeat(INetworkChannel channel, int missCount)
{
if (channel != _networkChannel)
{
return;
}
Log.Fatal("Network channel '{0}' miss heart beat '{1}' times.", channel.Name, missCount.ToString());
if (missCount < 2)
{
return;
}
channel.Close();
}
private void OnNetworkError(INetworkChannel channel, NetworkErrorCode networkErrorCode, SocketError socketError, string errorMessage)
{
if (channel != _networkChannel)
{
return;
}
Log.Fatal("Network channel '{0}' error, error code is '{1}', error message is '{2}'.", channel.Name, networkErrorCode.ToString(), errorMessage);
channel.Close();
}
private void OnNetworkCustomError(INetworkChannel channel, object userData)
{
if (channel != _networkChannel)
{
return;
}
}
public void Clear()
{
}
}
}

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