├── README.md └── unitylib ├── gamelib ├── Assembly-CSharp.csproj ├── Assets │ ├── Editor.meta │ ├── Editor │ │ ├── GameStartupAuto.cs │ │ └── GameStartupAuto.cs.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── Network.meta │ │ ├── Network │ │ │ ├── TSocketDemo.cs │ │ │ ├── TSocketDemo.cs.meta │ │ │ ├── TcpDemo.unity │ │ │ └── TcpDemo.unity.meta │ │ ├── event.meta │ │ ├── event │ │ │ ├── EventDemo.cs │ │ │ ├── EventDemo.cs.meta │ │ │ ├── EventDemo.unity │ │ │ └── EventDemo.unity.meta │ │ ├── timer.meta │ │ └── timer │ │ │ ├── TimerDemo.cs │ │ │ ├── TimerDemo.cs.meta │ │ │ ├── TimerDemo.unity │ │ │ └── TimerDemo.unity.meta │ ├── script.meta │ └── script │ │ ├── lib.meta │ │ └── lib │ │ ├── manager.meta │ │ ├── manager │ │ ├── AppConst.cs │ │ ├── AppConst.cs.meta │ │ ├── IManager.cs │ │ ├── IManager.cs.meta │ │ ├── Manager.cs │ │ ├── Manager.cs.meta │ │ ├── ManagerName.cs │ │ ├── ManagerName.cs.meta │ │ ├── network.meta │ │ ├── network │ │ │ ├── ISocketMessage.cs │ │ │ ├── ISocketMessage.cs.meta │ │ │ ├── NetWorkMgr.cs │ │ │ └── NetWorkMgr.cs.meta │ │ ├── timer.meta │ │ ├── timer │ │ │ ├── ITimerBehaviour.cs │ │ │ ├── ITimerBehaviour.cs.meta │ │ │ ├── TimerCommond.cs │ │ │ ├── TimerCommond.cs.meta │ │ │ ├── TimerManager.cs │ │ │ └── TimerManager.cs.meta │ │ ├── util.meta │ │ └── util │ │ │ ├── EventManager.cs │ │ │ ├── EventManager.cs.meta │ │ │ ├── Singleton.cs │ │ │ └── Singleton.cs.meta │ │ ├── mvc.meta │ │ ├── mvc │ │ ├── AppFacade.cs │ │ ├── AppFacade.cs.meta │ │ ├── Base.cs │ │ ├── Base.cs.meta │ │ ├── Controller.cs │ │ ├── Controller.cs.meta │ │ ├── Facade.cs │ │ ├── Facade.cs.meta │ │ ├── GameManager.cs │ │ ├── GameManager.cs.meta │ │ ├── ICommand.cs │ │ ├── ICommand.cs.meta │ │ ├── IController.cs │ │ ├── IController.cs.meta │ │ ├── IMessage.cs │ │ ├── IMessage.cs.meta │ │ ├── IView.cs │ │ ├── IView.cs.meta │ │ ├── Message.cs │ │ ├── Message.cs.meta │ │ ├── NotiConst.cs │ │ ├── NotiConst.cs.meta │ │ ├── StartUpCommand.cs │ │ └── StartUpCommand.cs.meta │ │ ├── net.meta │ │ └── net │ │ ├── socket.meta │ │ ├── socket │ │ ├── SockProxy.cs │ │ ├── SockProxy.cs.meta │ │ ├── tcp.meta │ │ └── tcp │ │ │ ├── SockType.cs │ │ │ ├── SockType.cs.meta │ │ │ ├── TConfig.cs │ │ │ ├── TConfig.cs.meta │ │ │ ├── TSendModel.cs │ │ │ ├── TSendModel.cs.meta │ │ │ ├── TSock.cs │ │ │ ├── TSock.cs.meta │ │ │ ├── TSocketClient.cs │ │ │ └── TSocketClient.cs.meta │ │ ├── util.meta │ │ └── util │ │ ├── interfaces.meta │ │ └── interfaces │ │ ├── BytesUtils.cs │ │ ├── BytesUtils.cs.meta │ │ ├── INetWork.cs │ │ ├── INetWork.cs.meta │ │ ├── NetConfig.cs │ │ ├── NetConfig.cs.meta │ │ ├── NetHandler.cs │ │ ├── NetHandler.cs.meta │ │ ├── NetSendModel.cs │ │ └── NetSendModel.cs.meta ├── Logs │ └── Packages-Update.log ├── Packages │ └── manifest.json ├── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NetworkManager.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityConnectSettings.asset │ └── VFXManager.asset └── gamelib.sln └── readme.txt /README.md: -------------------------------------------------------------------------------- 1 | # unitygamelib 2 | Unity部分底层框架,包含于网络框架(TCP/HTTP/UDP),热更新框架,加载框架等,protobuff,lua, 3 | 4 | 内部集成代码片段。以模块区分,具体模块介绍如下。本Git为本人在闲余时间整理,更新不及时敬请谅解,有什么问题可直接提问, 5 | 项目内容如下: 6 | 7 | #1.网络部分 8 | 9 | 1.TCP通信,服务器采用 NetCore Donetty 网络框架,客户端为异步逻辑,处理方面, 关于TCP的粘包,断线重连,移动端切后台处理,封装方式简单, 10 | 基本几行代码就可以实现一个Tcp实例, 11 | 12 | 协议指定方式: 13 | 消息头:byte 0x09 14 | 消息ID:short 15 | 消息长度:int 16 | 消息体:自定义 17 | 18 | 代码部分:TSock.cs demo TcpDemo 启动后自动连接,按A键发送消息 19 | 使用说明: 20 | 21 | 创建socket 实例: 22 | NetWorkMgr networkMgr = AppFacade.Instance.GetManager(ManagerName.NetWorkMgr); 23 | TSock sock = networkMgr.CreateTcpSocket(config,socketMessage,autoconnec,autoConnecSecond,bufferSize) 24 | 其他构造参数可选: 25 | /// 26 | /// 构造函数 27 | /// 28 | /// Socket基础配置 29 | /// Socket 类型,默认为TCP 30 | /// 是否重连 31 | /// 重连间隔 32 | /// 自定义的缓冲区大小, 33 | /// 自定义回调, 34 | //添加socket 事件监听 35 | 36 | //启动socket 37 | sock.Start(); 38 | 39 | //接口实现 40 | public void NetCoreCallBack(NetCoreBackData netCoreBackData) 41 | { 42 | switch (netCoreBackData.sockType) 43 | { 44 | ///首次连接成功 45 | case SockType.ChannelRegistered: 46 | 47 | break; 48 | //断线重连成功 49 | case SockType.ChannelResetRegistered: 50 | 51 | break; 52 | //socket 断开 53 | case SockType.ChannelWillBreak: 54 | 55 | break; 56 | //新消息 57 | case SockType.ChannelRead: 58 | 59 | Debug.Log("接受到新消息了!"); 60 | 61 | break; 62 | } 63 | } 64 | 65 | 发送消息: 66 | //msgId 为消息ID array 为字节数组 67 | sock.Send(new TSendModel() { msgId = 1, array = array}); 68 | 69 | 注意,关闭游戏/编辑器请释放此socket 对象,调用方式 70 | 71 | private void OnDestroy() 72 | { 73 | sock.Dispose(); 74 | } 75 | 76 | 77 | #2.定时器功能实现 78 | 类:TimerDemo 79 | 调用方式: 80 | TimerInfo timerInfo = new TimerInfo("TimerDemo", timerCommond,10); //参数: 定时器Name, 回调接口,定时器执行的总次数(为0代表无线循环) 81 | TimerManager timerManager = AppFacade.Instance.GetManager(ManagerName.Timer); 82 | timerManager.AddTimerEvent(timerInfo); 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assembly-CSharp.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | latest 5 | 6 | 7 | Debug 8 | AnyCPU 9 | 10.0.20506 10 | 2.0 11 | 12 | {EBC8EE02-9E80-4D9A-3788-DE915C409FAB} 13 | Library 14 | Properties 15 | Assembly-CSharp 16 | v4.7.1 17 | 512 18 | . 19 | 20 | 21 | true 22 | full 23 | false 24 | Temp\bin\Debug\ 25 | DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2018_4_3;UNITY_2018_4;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;UNITY_ANALYTICS;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_STANDARD_2_0;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER 26 | prompt 27 | 4 28 | 0169 29 | False 30 | 31 | 32 | pdbonly 33 | true 34 | Temp\bin\Release\ 35 | prompt 36 | 4 37 | 0169 38 | False 39 | 40 | 41 | true 42 | true 43 | false 44 | false 45 | false 46 | 47 | 48 | {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 49 | Unity/VSTU 50 | Game:1 51 | StandaloneWindows64:19 52 | 2018.4.3f1 53 | 54 | 55 | 56 | C:\an\Editor\Data\Managed/UnityEngine/UnityEngine.dll 57 | 58 | 59 | C:\an\Editor\Data\Managed/UnityEditor.dll 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | D:/gits/trunk/unitylib/gamelib/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll 77 | 78 | 79 | D:/gits/trunk/unitylib/gamelib/Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll 80 | 81 | 82 | D:/gits/trunk/unitylib/gamelib/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll 83 | 84 | 85 | D:/gits/trunk/unitylib/gamelib/Library/ScriptAssemblies/Unity.TextMeshPro.dll 86 | 87 | 88 | D:/gits/trunk/unitylib/gamelib/Library/ScriptAssemblies/Unity.Analytics.DataPrivacy.dll 89 | 90 | 91 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll 92 | 93 | 94 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll 95 | 96 | 97 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll 98 | 99 | 100 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll 101 | 102 | 103 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll 104 | 105 | 106 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll 107 | 108 | 109 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.BaselibModule.dll 110 | 111 | 112 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll 113 | 114 | 115 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll 116 | 117 | 118 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll 119 | 120 | 121 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll 122 | 123 | 124 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll 125 | 126 | 127 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll 128 | 129 | 130 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll 131 | 132 | 133 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll 134 | 135 | 136 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll 137 | 138 | 139 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll 140 | 141 | 142 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll 143 | 144 | 145 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll 146 | 147 | 148 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll 149 | 150 | 151 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll 152 | 153 | 154 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll 155 | 156 | 157 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll 158 | 159 | 160 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll 161 | 162 | 163 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll 164 | 165 | 166 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll 167 | 168 | 169 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll 170 | 171 | 172 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll 173 | 174 | 175 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll 176 | 177 | 178 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll 179 | 180 | 181 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll 182 | 183 | 184 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll 185 | 186 | 187 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll 188 | 189 | 190 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll 191 | 192 | 193 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll 194 | 195 | 196 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll 197 | 198 | 199 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll 200 | 201 | 202 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll 203 | 204 | 205 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll 206 | 207 | 208 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll 209 | 210 | 211 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.TimelineModule.dll 212 | 213 | 214 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll 215 | 216 | 217 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll 218 | 219 | 220 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll 221 | 222 | 223 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll 224 | 225 | 226 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll 227 | 228 | 229 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll 230 | 231 | 232 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll 233 | 234 | 235 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll 236 | 237 | 238 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll 239 | 240 | 241 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll 242 | 243 | 244 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll 245 | 246 | 247 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll 248 | 249 | 250 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll 251 | 252 | 253 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll 254 | 255 | 256 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll 257 | 258 | 259 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll 260 | 261 | 262 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll 263 | 264 | 265 | C:/an/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll 266 | 267 | 268 | C:/an/Editor/Data/Managed/Unity.Locator.dll 269 | 270 | 271 | C:/an/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll 272 | 273 | 274 | C:/an/Editor/Data/UnityExtensions/Unity/TestRunner/UnityEngine.TestRunner.dll 275 | 276 | 277 | C:/an/Editor/Data/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll 278 | 279 | 280 | C:/an/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll 281 | 282 | 283 | C:/an/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll 284 | 285 | 286 | C:/an/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll 287 | 288 | 289 | C:/an/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll 290 | 291 | 292 | D:/gits/trunk/unitylib/gamelib/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Editor.dll 293 | 294 | 295 | D:/gits/trunk/unitylib/gamelib/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.StandardEvents.dll 296 | 297 | 298 | D:/gits/trunk/unitylib/gamelib/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Tracker.dll 299 | 300 | 301 | C:/an/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll 302 | 303 | 304 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/Microsoft.Win32.Primitives.dll 305 | 306 | 307 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.AppContext.dll 308 | 309 | 310 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.Concurrent.dll 311 | 312 | 313 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.dll 314 | 315 | 316 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.NonGeneric.dll 317 | 318 | 319 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.Specialized.dll 320 | 321 | 322 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.dll 323 | 324 | 325 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.EventBasedAsync.dll 326 | 327 | 328 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.Primitives.dll 329 | 330 | 331 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.TypeConverter.dll 332 | 333 | 334 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Console.dll 335 | 336 | 337 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Data.Common.dll 338 | 339 | 340 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Contracts.dll 341 | 342 | 343 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Debug.dll 344 | 345 | 346 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.FileVersionInfo.dll 347 | 348 | 349 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Process.dll 350 | 351 | 352 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.StackTrace.dll 353 | 354 | 355 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.TextWriterTraceListener.dll 356 | 357 | 358 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Tools.dll 359 | 360 | 361 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.TraceSource.dll 362 | 363 | 364 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Tracing.dll 365 | 366 | 367 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Drawing.Primitives.dll 368 | 369 | 370 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Dynamic.Runtime.dll 371 | 372 | 373 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.Calendars.dll 374 | 375 | 376 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.dll 377 | 378 | 379 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.Extensions.dll 380 | 381 | 382 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Compression.dll 383 | 384 | 385 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Compression.ZipFile.dll 386 | 387 | 388 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.dll 389 | 390 | 391 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.dll 392 | 393 | 394 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.DriveInfo.dll 395 | 396 | 397 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.Primitives.dll 398 | 399 | 400 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.Watcher.dll 401 | 402 | 403 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.IsolatedStorage.dll 404 | 405 | 406 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.MemoryMappedFiles.dll 407 | 408 | 409 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Pipes.dll 410 | 411 | 412 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.UnmanagedMemoryStream.dll 413 | 414 | 415 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.dll 416 | 417 | 418 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Expressions.dll 419 | 420 | 421 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Parallel.dll 422 | 423 | 424 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Queryable.dll 425 | 426 | 427 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Http.dll 428 | 429 | 430 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.NameResolution.dll 431 | 432 | 433 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.NetworkInformation.dll 434 | 435 | 436 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Ping.dll 437 | 438 | 439 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Primitives.dll 440 | 441 | 442 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Requests.dll 443 | 444 | 445 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Security.dll 446 | 447 | 448 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Sockets.dll 449 | 450 | 451 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebHeaderCollection.dll 452 | 453 | 454 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebSockets.Client.dll 455 | 456 | 457 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebSockets.dll 458 | 459 | 460 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ObjectModel.dll 461 | 462 | 463 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.dll 464 | 465 | 466 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.Extensions.dll 467 | 468 | 469 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.Primitives.dll 470 | 471 | 472 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.Reader.dll 473 | 474 | 475 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.ResourceManager.dll 476 | 477 | 478 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.Writer.dll 479 | 480 | 481 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.CompilerServices.VisualC.dll 482 | 483 | 484 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.dll 485 | 486 | 487 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Extensions.dll 488 | 489 | 490 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Handles.dll 491 | 492 | 493 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.InteropServices.dll 494 | 495 | 496 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.InteropServices.RuntimeInformation.dll 497 | 498 | 499 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Numerics.dll 500 | 501 | 502 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Formatters.dll 503 | 504 | 505 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Json.dll 506 | 507 | 508 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Primitives.dll 509 | 510 | 511 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Xml.dll 512 | 513 | 514 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Claims.dll 515 | 516 | 517 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Algorithms.dll 518 | 519 | 520 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Csp.dll 521 | 522 | 523 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Encoding.dll 524 | 525 | 526 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Primitives.dll 527 | 528 | 529 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.X509Certificates.dll 530 | 531 | 532 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Principal.dll 533 | 534 | 535 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.SecureString.dll 536 | 537 | 538 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.Encoding.dll 539 | 540 | 541 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.Encoding.Extensions.dll 542 | 543 | 544 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.RegularExpressions.dll 545 | 546 | 547 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.dll 548 | 549 | 550 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Overlapped.dll 551 | 552 | 553 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Tasks.dll 554 | 555 | 556 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Tasks.Parallel.dll 557 | 558 | 559 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Thread.dll 560 | 561 | 562 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.ThreadPool.dll 563 | 564 | 565 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Timer.dll 566 | 567 | 568 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ValueTuple.dll 569 | 570 | 571 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.ReaderWriter.dll 572 | 573 | 574 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XDocument.dll 575 | 576 | 577 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XmlDocument.dll 578 | 579 | 580 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XmlSerializer.dll 581 | 582 | 583 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XPath.dll 584 | 585 | 586 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XPath.XDocument.dll 587 | 588 | 589 | C:/an/Editor/Data/NetStandard/Extensions/2.0.0/System.Numerics.Vectors.dll 590 | 591 | 592 | C:/an/Editor/Data/NetStandard/Extensions/2.0.0/System.Runtime.InteropServices.WindowsRuntime.dll 593 | 594 | 595 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/mscorlib.dll 596 | 597 | 598 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.ComponentModel.Composition.dll 599 | 600 | 601 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Core.dll 602 | 603 | 604 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Data.dll 605 | 606 | 607 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.dll 608 | 609 | 610 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Drawing.dll 611 | 612 | 613 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.IO.Compression.FileSystem.dll 614 | 615 | 616 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Net.dll 617 | 618 | 619 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Numerics.dll 620 | 621 | 622 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Runtime.Serialization.dll 623 | 624 | 625 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.ServiceModel.Web.dll 626 | 627 | 628 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Transactions.dll 629 | 630 | 631 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Web.dll 632 | 633 | 634 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Windows.dll 635 | 636 | 637 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.dll 638 | 639 | 640 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Linq.dll 641 | 642 | 643 | C:/an/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll 644 | 645 | 646 | 647 | 648 | 655 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e89aaeab7d86554cb3369285828e65f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Editor/GameStartupAuto.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | [InitializeOnLoad] 7 | public class GameStartupAuto 8 | { 9 | static GameStartupAuto() 10 | { 11 | //GameObject gameObject = GameObject.Find("GameManager"); 12 | //if (gameObject == null) 13 | //{ 14 | // gameObject = new GameObject(); 15 | // gameObject.name = "GameManager"; 16 | // gameObject.AddComponent(); 17 | //} 18 | //else 19 | //{ 20 | // GameObject.Destroy(gameObject); 21 | //} 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Editor/GameStartupAuto.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d82c12d18e29834084f1dcfafd0ad7b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3d28abd670dfc547948a21fe1db2d9b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/Network.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31a8b8f243436834e85010a3376ac0e4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/Network/TSocketDemo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class TSocketDemo : MonoBehaviour,ISocketMessage 6 | { 7 | public string ip; 8 | 9 | public int port; 10 | 11 | TSock sock; 12 | // Start is called before the first frame update 13 | void Start() 14 | { 15 | AppFacade.Instance.StartUp(); 16 | NetWorkMgr networkMgr = AppFacade.Instance.GetManager(ManagerName.NetWorkMgr); 17 | sock = networkMgr.CreateTcpSocket(new TConfig() { ip = ip, name = "TSocketDemo", port = port }, this); 18 | sock.Start(); 19 | 20 | } 21 | 22 | // Update is called once per frame 23 | void Update() 24 | { 25 | if (Input.GetKeyDown(KeyCode.A)) 26 | { 27 | if (sock.isConnection) 28 | { 29 | byte[] hd = System.Text.Encoding.UTF8.GetBytes("你好呀"); 30 | sock.Send(new TSendModel() { msgId = 1, array = hd}); 31 | } 32 | } 33 | } 34 | 35 | private void OnDestroy() 36 | { 37 | sock.Dispose(); 38 | } 39 | 40 | public void NetCoreCallBack(NetCoreBackData netCoreBackData) 41 | { 42 | switch (netCoreBackData.sockType) 43 | { 44 | ///首次连接成功 45 | case SockType.ChannelRegistered: 46 | 47 | break; 48 | //断线重连成功 49 | case SockType.ChannelResetRegistered: 50 | 51 | break; 52 | //socket 断开 53 | case SockType.ChannelWillBreak: 54 | 55 | break; 56 | //新消息 57 | case SockType.ChannelRead: 58 | 59 | Debug.Log("接受到新消息了!"); 60 | 61 | break; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/Network/TSocketDemo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5ca8908c25b6fd4da7d88a5f2364f97 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/Network/TcpDemo.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 170076734} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 10 60 | m_AtlasSize: 512 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 256 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &170076733 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 170076735} 124 | - component: {fileID: 170076734} 125 | m_Layer: 0 126 | m_Name: Directional Light 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!108 &170076734 133 | Light: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInstance: {fileID: 0} 137 | m_PrefabAsset: {fileID: 0} 138 | m_GameObject: {fileID: 170076733} 139 | m_Enabled: 1 140 | serializedVersion: 8 141 | m_Type: 1 142 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 143 | m_Intensity: 1 144 | m_Range: 10 145 | m_SpotAngle: 30 146 | m_CookieSize: 10 147 | m_Shadows: 148 | m_Type: 2 149 | m_Resolution: -1 150 | m_CustomResolution: -1 151 | m_Strength: 1 152 | m_Bias: 0.05 153 | m_NormalBias: 0.4 154 | m_NearPlane: 0.2 155 | m_Cookie: {fileID: 0} 156 | m_DrawHalo: 0 157 | m_Flare: {fileID: 0} 158 | m_RenderMode: 0 159 | m_CullingMask: 160 | serializedVersion: 2 161 | m_Bits: 4294967295 162 | m_Lightmapping: 1 163 | m_LightShadowCasterMode: 0 164 | m_AreaSize: {x: 1, y: 1} 165 | m_BounceIntensity: 1 166 | m_ColorTemperature: 6570 167 | m_UseColorTemperature: 0 168 | m_ShadowRadius: 0 169 | m_ShadowAngle: 0 170 | --- !u!4 &170076735 171 | Transform: 172 | m_ObjectHideFlags: 0 173 | m_CorrespondingSourceObject: {fileID: 0} 174 | m_PrefabInstance: {fileID: 0} 175 | m_PrefabAsset: {fileID: 0} 176 | m_GameObject: {fileID: 170076733} 177 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 178 | m_LocalPosition: {x: 0, y: 3, z: 0} 179 | m_LocalScale: {x: 1, y: 1, z: 1} 180 | m_Children: [] 181 | m_Father: {fileID: 0} 182 | m_RootOrder: 1 183 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 184 | --- !u!1 &534669902 185 | GameObject: 186 | m_ObjectHideFlags: 0 187 | m_CorrespondingSourceObject: {fileID: 0} 188 | m_PrefabInstance: {fileID: 0} 189 | m_PrefabAsset: {fileID: 0} 190 | serializedVersion: 6 191 | m_Component: 192 | - component: {fileID: 534669905} 193 | - component: {fileID: 534669904} 194 | - component: {fileID: 534669903} 195 | - component: {fileID: 534669906} 196 | m_Layer: 0 197 | m_Name: Main Camera 198 | m_TagString: MainCamera 199 | m_Icon: {fileID: 0} 200 | m_NavMeshLayer: 0 201 | m_StaticEditorFlags: 0 202 | m_IsActive: 1 203 | --- !u!81 &534669903 204 | AudioListener: 205 | m_ObjectHideFlags: 0 206 | m_CorrespondingSourceObject: {fileID: 0} 207 | m_PrefabInstance: {fileID: 0} 208 | m_PrefabAsset: {fileID: 0} 209 | m_GameObject: {fileID: 534669902} 210 | m_Enabled: 1 211 | --- !u!20 &534669904 212 | Camera: 213 | m_ObjectHideFlags: 0 214 | m_CorrespondingSourceObject: {fileID: 0} 215 | m_PrefabInstance: {fileID: 0} 216 | m_PrefabAsset: {fileID: 0} 217 | m_GameObject: {fileID: 534669902} 218 | m_Enabled: 1 219 | serializedVersion: 2 220 | m_ClearFlags: 1 221 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 222 | m_projectionMatrixMode: 1 223 | m_SensorSize: {x: 36, y: 24} 224 | m_LensShift: {x: 0, y: 0} 225 | m_GateFitMode: 2 226 | m_FocalLength: 50 227 | m_NormalizedViewPortRect: 228 | serializedVersion: 2 229 | x: 0 230 | y: 0 231 | width: 1 232 | height: 1 233 | near clip plane: 0.3 234 | far clip plane: 1000 235 | field of view: 60 236 | orthographic: 0 237 | orthographic size: 5 238 | m_Depth: -1 239 | m_CullingMask: 240 | serializedVersion: 2 241 | m_Bits: 4294967295 242 | m_RenderingPath: -1 243 | m_TargetTexture: {fileID: 0} 244 | m_TargetDisplay: 0 245 | m_TargetEye: 3 246 | m_HDR: 1 247 | m_AllowMSAA: 1 248 | m_AllowDynamicResolution: 0 249 | m_ForceIntoRT: 0 250 | m_OcclusionCulling: 1 251 | m_StereoConvergence: 10 252 | m_StereoSeparation: 0.022 253 | --- !u!4 &534669905 254 | Transform: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | m_GameObject: {fileID: 534669902} 260 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 261 | m_LocalPosition: {x: 0, y: 1, z: -10} 262 | m_LocalScale: {x: 1, y: 1, z: 1} 263 | m_Children: [] 264 | m_Father: {fileID: 0} 265 | m_RootOrder: 0 266 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 267 | --- !u!114 &534669906 268 | MonoBehaviour: 269 | m_ObjectHideFlags: 0 270 | m_CorrespondingSourceObject: {fileID: 0} 271 | m_PrefabInstance: {fileID: 0} 272 | m_PrefabAsset: {fileID: 0} 273 | m_GameObject: {fileID: 534669902} 274 | m_Enabled: 1 275 | m_EditorHideFlags: 0 276 | m_Script: {fileID: 11500000, guid: b5ca8908c25b6fd4da7d88a5f2364f97, type: 3} 277 | m_Name: 278 | m_EditorClassIdentifier: 279 | ip: 127.0.0.1 280 | port: 9005 281 | --- !u!1 &852145879 282 | GameObject: 283 | m_ObjectHideFlags: 0 284 | m_CorrespondingSourceObject: {fileID: 0} 285 | m_PrefabInstance: {fileID: 0} 286 | m_PrefabAsset: {fileID: 0} 287 | serializedVersion: 6 288 | m_Component: 289 | - component: {fileID: 852145880} 290 | - component: {fileID: 852145881} 291 | m_Layer: 0 292 | m_Name: GameManager 293 | m_TagString: Untagged 294 | m_Icon: {fileID: 0} 295 | m_NavMeshLayer: 0 296 | m_StaticEditorFlags: 0 297 | m_IsActive: 1 298 | --- !u!4 &852145880 299 | Transform: 300 | m_ObjectHideFlags: 0 301 | m_CorrespondingSourceObject: {fileID: 0} 302 | m_PrefabInstance: {fileID: 0} 303 | m_PrefabAsset: {fileID: 0} 304 | m_GameObject: {fileID: 852145879} 305 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 306 | m_LocalPosition: {x: 0, y: 0, z: 0} 307 | m_LocalScale: {x: 1, y: 1, z: 1} 308 | m_Children: [] 309 | m_Father: {fileID: 0} 310 | m_RootOrder: 2 311 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 312 | --- !u!114 &852145881 313 | MonoBehaviour: 314 | m_ObjectHideFlags: 0 315 | m_CorrespondingSourceObject: {fileID: 0} 316 | m_PrefabInstance: {fileID: 0} 317 | m_PrefabAsset: {fileID: 0} 318 | m_GameObject: {fileID: 852145879} 319 | m_Enabled: 1 320 | m_EditorHideFlags: 0 321 | m_Script: {fileID: 11500000, guid: b0382c4c1d8433545bc98d87613a2920, type: 3} 322 | m_Name: 323 | m_EditorClassIdentifier: 324 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/Network/TcpDemo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 757f1cc8b0b4f22438a52026a705f07e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/event.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eedef23fe8dbafe4eb2bd5bea3047e9c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/event/EventDemo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class EventDemo : MonoBehaviour 6 | { 7 | // Start is called before the first frame update 8 | void Start() 9 | { 10 | EventManager.Instance.AddEvent("hd", delegate (object obj) { 11 | 12 | Debug.Log(obj); 13 | }); 14 | } 15 | 16 | // Update is called once per frame 17 | void Update() 18 | { 19 | if (Input.GetKeyDown(KeyCode.A)) 20 | { 21 | EventManager.Instance.TriggerEvent("hd","我很好的"); 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/event/EventDemo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 019190f2ded8b5e4a967d64cf89d0579 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/event/EventDemo.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &270262597 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 270262599} 124 | - component: {fileID: 270262598} 125 | m_Layer: 0 126 | m_Name: Directional Light 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!108 &270262598 133 | Light: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInstance: {fileID: 0} 137 | m_PrefabAsset: {fileID: 0} 138 | m_GameObject: {fileID: 270262597} 139 | m_Enabled: 1 140 | serializedVersion: 8 141 | m_Type: 1 142 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 143 | m_Intensity: 1 144 | m_Range: 10 145 | m_SpotAngle: 30 146 | m_CookieSize: 10 147 | m_Shadows: 148 | m_Type: 2 149 | m_Resolution: -1 150 | m_CustomResolution: -1 151 | m_Strength: 1 152 | m_Bias: 0.05 153 | m_NormalBias: 0.4 154 | m_NearPlane: 0.2 155 | m_Cookie: {fileID: 0} 156 | m_DrawHalo: 0 157 | m_Flare: {fileID: 0} 158 | m_RenderMode: 0 159 | m_CullingMask: 160 | serializedVersion: 2 161 | m_Bits: 4294967295 162 | m_Lightmapping: 4 163 | m_LightShadowCasterMode: 0 164 | m_AreaSize: {x: 1, y: 1} 165 | m_BounceIntensity: 1 166 | m_ColorTemperature: 6570 167 | m_UseColorTemperature: 0 168 | m_ShadowRadius: 0 169 | m_ShadowAngle: 0 170 | --- !u!4 &270262599 171 | Transform: 172 | m_ObjectHideFlags: 0 173 | m_CorrespondingSourceObject: {fileID: 0} 174 | m_PrefabInstance: {fileID: 0} 175 | m_PrefabAsset: {fileID: 0} 176 | m_GameObject: {fileID: 270262597} 177 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 178 | m_LocalPosition: {x: 0, y: 3, z: 0} 179 | m_LocalScale: {x: 1, y: 1, z: 1} 180 | m_Children: [] 181 | m_Father: {fileID: 0} 182 | m_RootOrder: 1 183 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 184 | --- !u!1 &1009282542 185 | GameObject: 186 | m_ObjectHideFlags: 0 187 | m_CorrespondingSourceObject: {fileID: 0} 188 | m_PrefabInstance: {fileID: 0} 189 | m_PrefabAsset: {fileID: 0} 190 | serializedVersion: 6 191 | m_Component: 192 | - component: {fileID: 1009282545} 193 | - component: {fileID: 1009282544} 194 | - component: {fileID: 1009282543} 195 | - component: {fileID: 1009282546} 196 | m_Layer: 0 197 | m_Name: Main Camera 198 | m_TagString: MainCamera 199 | m_Icon: {fileID: 0} 200 | m_NavMeshLayer: 0 201 | m_StaticEditorFlags: 0 202 | m_IsActive: 1 203 | --- !u!81 &1009282543 204 | AudioListener: 205 | m_ObjectHideFlags: 0 206 | m_CorrespondingSourceObject: {fileID: 0} 207 | m_PrefabInstance: {fileID: 0} 208 | m_PrefabAsset: {fileID: 0} 209 | m_GameObject: {fileID: 1009282542} 210 | m_Enabled: 1 211 | --- !u!20 &1009282544 212 | Camera: 213 | m_ObjectHideFlags: 0 214 | m_CorrespondingSourceObject: {fileID: 0} 215 | m_PrefabInstance: {fileID: 0} 216 | m_PrefabAsset: {fileID: 0} 217 | m_GameObject: {fileID: 1009282542} 218 | m_Enabled: 1 219 | serializedVersion: 2 220 | m_ClearFlags: 1 221 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 222 | m_projectionMatrixMode: 1 223 | m_SensorSize: {x: 36, y: 24} 224 | m_LensShift: {x: 0, y: 0} 225 | m_GateFitMode: 2 226 | m_FocalLength: 50 227 | m_NormalizedViewPortRect: 228 | serializedVersion: 2 229 | x: 0 230 | y: 0 231 | width: 1 232 | height: 1 233 | near clip plane: 0.3 234 | far clip plane: 1000 235 | field of view: 60 236 | orthographic: 0 237 | orthographic size: 5 238 | m_Depth: -1 239 | m_CullingMask: 240 | serializedVersion: 2 241 | m_Bits: 4294967295 242 | m_RenderingPath: -1 243 | m_TargetTexture: {fileID: 0} 244 | m_TargetDisplay: 0 245 | m_TargetEye: 3 246 | m_HDR: 1 247 | m_AllowMSAA: 1 248 | m_AllowDynamicResolution: 0 249 | m_ForceIntoRT: 0 250 | m_OcclusionCulling: 1 251 | m_StereoConvergence: 10 252 | m_StereoSeparation: 0.022 253 | --- !u!4 &1009282545 254 | Transform: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | m_GameObject: {fileID: 1009282542} 260 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 261 | m_LocalPosition: {x: 0, y: 1, z: -10} 262 | m_LocalScale: {x: 1, y: 1, z: 1} 263 | m_Children: [] 264 | m_Father: {fileID: 0} 265 | m_RootOrder: 0 266 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 267 | --- !u!114 &1009282546 268 | MonoBehaviour: 269 | m_ObjectHideFlags: 0 270 | m_CorrespondingSourceObject: {fileID: 0} 271 | m_PrefabInstance: {fileID: 0} 272 | m_PrefabAsset: {fileID: 0} 273 | m_GameObject: {fileID: 1009282542} 274 | m_Enabled: 1 275 | m_EditorHideFlags: 0 276 | m_Script: {fileID: 11500000, guid: 019190f2ded8b5e4a967d64cf89d0579, type: 3} 277 | m_Name: 278 | m_EditorClassIdentifier: 279 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/event/EventDemo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3758ce66f53f99c4d97d9dc886cee248 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/timer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15cc5ed790581a448b9f5e6a5c143795 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/timer/TimerDemo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class TimerDemo : MonoBehaviour 6 | { 7 | TimerInfo timerInfo; 8 | TimerCommond timerCommond; 9 | public void TimerUpdate() 10 | { 11 | Debug.Log("ok"+timerInfo.tick); 12 | } 13 | 14 | // Start is called before the first frame update 15 | void Start() 16 | { 17 | timerCommond = new TimerCommond() { 18 | 19 | onTimerCallBack = delegate () { 20 | Debug.Log("ok" + timerInfo.tick); 21 | } 22 | }; 23 | timerInfo = new TimerInfo("TimerDemo", timerCommond,10); 24 | ///启动MVC架构 25 | AppFacade.Instance.StartUp(); 26 | TimerManager timerManager = AppFacade.Instance.GetManager(ManagerName.Timer); 27 | timerManager.AddTimerEvent(timerInfo); 28 | 29 | 30 | } 31 | 32 | // Update is called once per frame 33 | void Update() 34 | { 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/timer/TimerDemo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6893a502f1998c34894b9402d2c34ed8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/timer/TimerDemo.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &751988052 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 751988053} 124 | - component: {fileID: 751988054} 125 | m_Layer: 0 126 | m_Name: GameManager 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!4 &751988053 133 | Transform: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInstance: {fileID: 0} 137 | m_PrefabAsset: {fileID: 0} 138 | m_GameObject: {fileID: 751988052} 139 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 140 | m_LocalPosition: {x: 0, y: 0, z: 0} 141 | m_LocalScale: {x: 1, y: 1, z: 1} 142 | m_Children: [] 143 | m_Father: {fileID: 0} 144 | m_RootOrder: 2 145 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 146 | --- !u!114 &751988054 147 | MonoBehaviour: 148 | m_ObjectHideFlags: 0 149 | m_CorrespondingSourceObject: {fileID: 0} 150 | m_PrefabInstance: {fileID: 0} 151 | m_PrefabAsset: {fileID: 0} 152 | m_GameObject: {fileID: 751988052} 153 | m_Enabled: 1 154 | m_EditorHideFlags: 0 155 | m_Script: {fileID: 11500000, guid: b0382c4c1d8433545bc98d87613a2920, type: 3} 156 | m_Name: 157 | m_EditorClassIdentifier: 158 | --- !u!1 &941732248 159 | GameObject: 160 | m_ObjectHideFlags: 0 161 | m_CorrespondingSourceObject: {fileID: 0} 162 | m_PrefabInstance: {fileID: 0} 163 | m_PrefabAsset: {fileID: 0} 164 | serializedVersion: 6 165 | m_Component: 166 | - component: {fileID: 941732251} 167 | - component: {fileID: 941732250} 168 | - component: {fileID: 941732249} 169 | - component: {fileID: 941732252} 170 | m_Layer: 0 171 | m_Name: Main Camera 172 | m_TagString: MainCamera 173 | m_Icon: {fileID: 0} 174 | m_NavMeshLayer: 0 175 | m_StaticEditorFlags: 0 176 | m_IsActive: 1 177 | --- !u!81 &941732249 178 | AudioListener: 179 | m_ObjectHideFlags: 0 180 | m_CorrespondingSourceObject: {fileID: 0} 181 | m_PrefabInstance: {fileID: 0} 182 | m_PrefabAsset: {fileID: 0} 183 | m_GameObject: {fileID: 941732248} 184 | m_Enabled: 1 185 | --- !u!20 &941732250 186 | Camera: 187 | m_ObjectHideFlags: 0 188 | m_CorrespondingSourceObject: {fileID: 0} 189 | m_PrefabInstance: {fileID: 0} 190 | m_PrefabAsset: {fileID: 0} 191 | m_GameObject: {fileID: 941732248} 192 | m_Enabled: 1 193 | serializedVersion: 2 194 | m_ClearFlags: 1 195 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 196 | m_projectionMatrixMode: 1 197 | m_SensorSize: {x: 36, y: 24} 198 | m_LensShift: {x: 0, y: 0} 199 | m_GateFitMode: 2 200 | m_FocalLength: 50 201 | m_NormalizedViewPortRect: 202 | serializedVersion: 2 203 | x: 0 204 | y: 0 205 | width: 1 206 | height: 1 207 | near clip plane: 0.3 208 | far clip plane: 1000 209 | field of view: 60 210 | orthographic: 0 211 | orthographic size: 5 212 | m_Depth: -1 213 | m_CullingMask: 214 | serializedVersion: 2 215 | m_Bits: 4294967295 216 | m_RenderingPath: -1 217 | m_TargetTexture: {fileID: 0} 218 | m_TargetDisplay: 0 219 | m_TargetEye: 3 220 | m_HDR: 1 221 | m_AllowMSAA: 1 222 | m_AllowDynamicResolution: 0 223 | m_ForceIntoRT: 0 224 | m_OcclusionCulling: 1 225 | m_StereoConvergence: 10 226 | m_StereoSeparation: 0.022 227 | --- !u!4 &941732251 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 941732248} 234 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 235 | m_LocalPosition: {x: 0, y: 1, z: -10} 236 | m_LocalScale: {x: 1, y: 1, z: 1} 237 | m_Children: [] 238 | m_Father: {fileID: 0} 239 | m_RootOrder: 0 240 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 241 | --- !u!114 &941732252 242 | MonoBehaviour: 243 | m_ObjectHideFlags: 0 244 | m_CorrespondingSourceObject: {fileID: 0} 245 | m_PrefabInstance: {fileID: 0} 246 | m_PrefabAsset: {fileID: 0} 247 | m_GameObject: {fileID: 941732248} 248 | m_Enabled: 1 249 | m_EditorHideFlags: 0 250 | m_Script: {fileID: 11500000, guid: 6893a502f1998c34894b9402d2c34ed8, type: 3} 251 | m_Name: 252 | m_EditorClassIdentifier: 253 | --- !u!1 &1746192902 254 | GameObject: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | serializedVersion: 6 260 | m_Component: 261 | - component: {fileID: 1746192904} 262 | - component: {fileID: 1746192903} 263 | m_Layer: 0 264 | m_Name: Directional Light 265 | m_TagString: Untagged 266 | m_Icon: {fileID: 0} 267 | m_NavMeshLayer: 0 268 | m_StaticEditorFlags: 0 269 | m_IsActive: 1 270 | --- !u!108 &1746192903 271 | Light: 272 | m_ObjectHideFlags: 0 273 | m_CorrespondingSourceObject: {fileID: 0} 274 | m_PrefabInstance: {fileID: 0} 275 | m_PrefabAsset: {fileID: 0} 276 | m_GameObject: {fileID: 1746192902} 277 | m_Enabled: 1 278 | serializedVersion: 8 279 | m_Type: 1 280 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 281 | m_Intensity: 1 282 | m_Range: 10 283 | m_SpotAngle: 30 284 | m_CookieSize: 10 285 | m_Shadows: 286 | m_Type: 2 287 | m_Resolution: -1 288 | m_CustomResolution: -1 289 | m_Strength: 1 290 | m_Bias: 0.05 291 | m_NormalBias: 0.4 292 | m_NearPlane: 0.2 293 | m_Cookie: {fileID: 0} 294 | m_DrawHalo: 0 295 | m_Flare: {fileID: 0} 296 | m_RenderMode: 0 297 | m_CullingMask: 298 | serializedVersion: 2 299 | m_Bits: 4294967295 300 | m_Lightmapping: 4 301 | m_LightShadowCasterMode: 0 302 | m_AreaSize: {x: 1, y: 1} 303 | m_BounceIntensity: 1 304 | m_ColorTemperature: 6570 305 | m_UseColorTemperature: 0 306 | m_ShadowRadius: 0 307 | m_ShadowAngle: 0 308 | --- !u!4 &1746192904 309 | Transform: 310 | m_ObjectHideFlags: 0 311 | m_CorrespondingSourceObject: {fileID: 0} 312 | m_PrefabInstance: {fileID: 0} 313 | m_PrefabAsset: {fileID: 0} 314 | m_GameObject: {fileID: 1746192902} 315 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 316 | m_LocalPosition: {x: 0, y: 3, z: 0} 317 | m_LocalScale: {x: 1, y: 1, z: 1} 318 | m_Children: [] 319 | m_Father: {fileID: 0} 320 | m_RootOrder: 1 321 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 322 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/Scenes/timer/TimerDemo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aff14b4e2aee6644a8c93a637816422c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e0e5c73f6d04ca4f924bc025b88fe29 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 800c755e99e25fd4797301f345eb9547 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4976d97aa88a10d4f88f8650d227a97b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/AppConst.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class AppConst 6 | { 7 | /// 8 | /// 定义的定时间隔 9 | /// 10 | public const int TimerInterval = 1; 11 | /// 12 | /// 游戏帧率 13 | /// 14 | public const int GameFrameRate = 30; 15 | } 16 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/AppConst.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ae67adcdc1a976498305ab5031101c1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/IManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public interface IManager 6 | { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/IManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df11973f148de4444b71b233d69aeab1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/Manager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Manager : Base, IManager 6 | { 7 | // Start is called before the first frame update 8 | void Awake() 9 | { 10 | 11 | } 12 | 13 | // Update is called once per frame 14 | void Update() 15 | { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/Manager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd9dbdde8042c0a42bc156744e93ad9d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/ManagerName.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | public class ManagerName 5 | { 6 | 7 | public const string Timer = "TimeManager"; 8 | public const string NetWorkMgr = "NetWorkMgr"; 9 | } -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/ManagerName.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45d4560b186e009479a76aa2414ca49a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/network.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a3ec19c933ce8141af2c9696c0fa1e5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/network/ISocketMessage.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | /// 5 | /// 接口类,主要用户回调参数 6 | /// 7 | public interface ISocketMessage 8 | { 9 | void NetCoreCallBack(NetCoreBackData netCoreBackData); 10 | } 11 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/network/ISocketMessage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39a146550984b6e4db416fb070957eed 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/network/NetWorkMgr.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Net.Sockets; 4 | using UnityEngine; 5 | 6 | public class NetWorkMgr : Manager 7 | { 8 | 9 | /// 10 | /// tcp socket list 集合 11 | /// 12 | public List tcpSockList = new List(); 13 | 14 | // Start is called before the first frame update 15 | void Start() 16 | { 17 | 18 | } 19 | 20 | /// 21 | /// 创建TCP对象接口 22 | /// 23 | /// 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// 29 | public TSock CreateTcpSocket(TConfig config, ISocketMessage socketMessage, bool autoconnec = true, int autoConnecSecond = 1000, int bufferSize = 1024) 30 | { 31 | TSock sock = new TSock(config, socketMessage, ProtocolType.Tcp, autoconnec,autoConnecSecond,bufferSize); 32 | var temp = tcpSockList.Find(m => m.tConfig.name.Equals(config.name)); 33 | if (temp != null) 34 | { 35 | temp.Dispose(); 36 | tcpSockList.Remove(temp); 37 | } 38 | tcpSockList.Add(sock); 39 | return sock; 40 | } 41 | 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/network/NetWorkMgr.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6462b46c5a289b46a4179a2e04e992a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/timer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d3284bafa85109489dd26008e571312 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/timer/ITimerBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | public interface ITimerBehaviour 5 | { 6 | void TimerUpdate(); 7 | } -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/timer/ITimerBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 770d92888371112498a0a1282f5a9d61 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/timer/TimerCommond.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class TimerCommond : ITimerBehaviour 6 | { 7 | 8 | /// 9 | /// 回调 10 | /// 11 | public delegate void OnTimerCallBack(); 12 | 13 | 14 | public OnTimerCallBack onTimerCallBack; 15 | 16 | /// 17 | /// 时间执行 18 | /// 19 | public void TimerUpdate() 20 | { 21 | if (onTimerCallBack != null) 22 | { 23 | onTimerCallBack.Invoke(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/timer/TimerCommond.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08092197294871e43b0928f4e6df9a2d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/timer/TimerManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class TimerManager : Manager 6 | { 7 | private float interval = 0; 8 | private List objects = new List(); 9 | 10 | public float Interval 11 | { 12 | get { return interval; } 13 | set { interval = value; } 14 | } 15 | 16 | // Use this for initialization 17 | void Start() 18 | { 19 | StartTimer(AppConst.TimerInterval); 20 | } 21 | 22 | /// 23 | /// 启动计时器 24 | /// 25 | /// 26 | public void StartTimer(float value) 27 | { 28 | interval = value; 29 | InvokeRepeating("Run", 0, interval); 30 | } 31 | 32 | /// 33 | /// 停止计时器 34 | /// 35 | public void StopTimer() 36 | { 37 | CancelInvoke("Run"); 38 | } 39 | 40 | /// 41 | /// 添加计时器事件 42 | /// 43 | /// 44 | /// 45 | public void AddTimerEvent(TimerInfo info) 46 | { 47 | if (!objects.Contains(info)) 48 | { 49 | objects.Add(info); 50 | } 51 | } 52 | 53 | /// 54 | /// 删除计时器事件 55 | /// 56 | /// 57 | public void RemoveTimerEvent(TimerInfo info) 58 | { 59 | if (objects.Contains(info) && info != null) 60 | { 61 | info.delete = true; 62 | } 63 | } 64 | 65 | /// 66 | /// 停止计时器事件 67 | /// 68 | /// 69 | public void StopTimerEvent(TimerInfo info) 70 | { 71 | if (objects.Contains(info) && info != null) 72 | { 73 | info.stop = true; 74 | } 75 | } 76 | 77 | /// 78 | /// 继续计时器事件 79 | /// 80 | /// 81 | public void ResumeTimerEvent(TimerInfo info) 82 | { 83 | if (objects.Contains(info) && info != null) 84 | { 85 | info.delete = false; 86 | } 87 | } 88 | 89 | /// 90 | /// 计时器运行 91 | /// 92 | void Run() 93 | { 94 | if (objects.Count == 0) return; 95 | for (int i = 0; i < objects.Count; i++) 96 | { 97 | TimerInfo o = objects[i]; 98 | if (o.delete || o.stop) { continue; } 99 | 100 | o.target.TimerUpdate(); 101 | o.tick++; 102 | if(o.fream == o.tick) 103 | { 104 | o.delete = true; 105 | } 106 | } 107 | /////////////////////////清除标记为删除的事件/////////////////////////// 108 | for (int i = objects.Count - 1; i >= 0; i--) 109 | { 110 | if (objects[i].delete) { objects.Remove(objects[i]); } 111 | } 112 | } 113 | } 114 | /// 115 | /// 定时器 116 | /// 117 | public class TimerInfo { 118 | 119 | public long tick; 120 | public bool stop; 121 | public bool delete; 122 | public long fream; //定义的执行次数,为0时代表无限循环 123 | public ITimerBehaviour target; 124 | public string className; 125 | 126 | public TimerInfo(string className, ITimerBehaviour target,long fream = 0) 127 | { 128 | this.className = className; 129 | this.target = target; 130 | this.fream = fream; 131 | delete = false; 132 | } 133 | } -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/timer/TimerManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c8ed3d8b11291e48bbb169a6bd74969 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/util.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9e7cca10facbb048b189861c2a144f5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/util/EventManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System; 5 | 6 | 7 | // 事件分发器 8 | public sealed class EventManager 9 | { 10 | private static EventManager _instance = null; 11 | private static readonly object SynObject = new object(); 12 | 13 | 14 | /// 15 | /// Gets the instance. 16 | /// 17 | public static EventManager Instance 18 | { 19 | get 20 | { 21 | // Syn operation. 22 | lock (SynObject) 23 | { 24 | return _instance ?? (_instance = new EventManager()); 25 | } 26 | } 27 | } 28 | protected Dictionary Events 29 | { 30 | get 31 | { 32 | if (mEventMap == null) 33 | mEventMap = new Dictionary(); 34 | return mEventMap; 35 | } 36 | } 37 | 38 | public void AddEvent(string evtName, Action evt) 39 | { 40 | Delegate evts; 41 | if (Events.TryGetValue(evtName, out evts)) 42 | { 43 | Action act = evts as Action; 44 | if (act != null) 45 | { 46 | act += evt; 47 | mEventMap[evtName] = act; 48 | } 49 | else 50 | throw new Exception("EventDispatch evt type is null"); 51 | } 52 | else 53 | Events.Add(evtName, evt); 54 | } 55 | 56 | 57 | public void RemoveEvent(string evtName, Action evt) 58 | { 59 | if ((mEventMap == null) || (evt == null)) 60 | return; 61 | 62 | Delegate evts; 63 | if (mEventMap.TryGetValue(evtName, out evts)) 64 | { 65 | Action act = evts as Action; 66 | if (act != null) 67 | { 68 | act -= evt; 69 | if (act == null) 70 | mEventMap.Remove(evtName); 71 | else 72 | mEventMap[evtName] = act; 73 | } 74 | else 75 | throw new Exception("EventDispatch evt type is null"); 76 | } 77 | } 78 | 79 | public void AddEvent(string evtName, Action evt) 80 | { 81 | Delegate evts; 82 | if (Events.TryGetValue(evtName, out evts)) 83 | { 84 | Action act = evts as Action; 85 | if (act != null) 86 | { 87 | act += evt; 88 | mEventMap[evtName] = act; 89 | } 90 | else 91 | throw new Exception("EventDispatch evt type is null"); 92 | } 93 | else 94 | Events.Add(evtName, evt); 95 | } 96 | 97 | public void RemoveEvent(string evtName, Action evt) 98 | { 99 | if ((mEventMap == null) || (evt == null)) 100 | return; 101 | 102 | Delegate evts; 103 | if (mEventMap.TryGetValue(evtName, out evts)) 104 | { 105 | Action act = evts as Action; 106 | if (act != null) 107 | { 108 | act -= evt; 109 | if (act == null) 110 | mEventMap.Remove(evtName); 111 | else 112 | mEventMap[evtName] = act; 113 | } 114 | else 115 | throw new Exception("EventDispatch evt type is null"); 116 | } 117 | } 118 | 119 | public void AddEvent(string evtName, Action evt) 120 | { 121 | Delegate evts; 122 | if (Events.TryGetValue(evtName, out evts)) 123 | { 124 | Action act = evts as Action; 125 | if (act != null) 126 | { 127 | act += evt; 128 | mEventMap[evtName] = act; 129 | } 130 | else 131 | throw new Exception("EventDispatch evt type is null"); 132 | } 133 | else 134 | Events.Add(evtName, evt); 135 | } 136 | 137 | public void RemoveEvent(string evtName, Action evt) 138 | { 139 | if ((mEventMap == null) || (evt == null)) 140 | return; 141 | 142 | Delegate evts; 143 | if (mEventMap.TryGetValue(evtName, out evts)) 144 | { 145 | Action act = evts as Action; 146 | if (act != null) 147 | { 148 | act -= evt; 149 | if (act == null) 150 | mEventMap.Remove(evtName); 151 | else 152 | mEventMap[evtName] = act; 153 | } 154 | else 155 | throw new Exception("EventDispatch evt type is null"); 156 | } 157 | } 158 | 159 | public void AddEvent(string evtName, Action evt) 160 | { 161 | Delegate evts; 162 | if (Events.TryGetValue(evtName, out evts)) 163 | { 164 | Action act = evts as Action; 165 | if (act != null) 166 | { 167 | act += evt; 168 | mEventMap[evtName] = act; 169 | } 170 | else 171 | throw new Exception("EventDispatch evt type is null"); 172 | } 173 | else 174 | Events.Add(evtName, evt); 175 | } 176 | 177 | public void RemoveEvent(string evtName, Action evt) 178 | { 179 | if ((mEventMap == null) || (evt == null)) 180 | return; 181 | 182 | Delegate evts; 183 | if (mEventMap.TryGetValue(evtName, out evts)) 184 | { 185 | Action act = evts as Action; 186 | if (act != null) 187 | { 188 | act -= evt; 189 | if (act == null) 190 | mEventMap.Remove(evtName); 191 | else 192 | mEventMap[evtName] = act; 193 | } 194 | else 195 | throw new Exception("EventDispatch evt type is null"); 196 | } 197 | } 198 | 199 | public void AddEvent(string evtName, Action evt) 200 | { 201 | Delegate evts; 202 | if (Events.TryGetValue(evtName, out evts)) 203 | { 204 | Action act = evts as Action; 205 | if (act != null) 206 | { 207 | act += evt; 208 | mEventMap[evtName] = act; 209 | } 210 | else 211 | throw new Exception("EventDispatch evt type is null"); 212 | } 213 | else 214 | Events.Add(evtName, evt); 215 | } 216 | 217 | public void RemoveEvent(string evtName, Action evt) 218 | { 219 | if ((mEventMap == null) || (evt == null)) 220 | return; 221 | 222 | Delegate evts; 223 | if (mEventMap.TryGetValue(evtName, out evts)) 224 | { 225 | Action act = evts as Action; 226 | if (act != null) 227 | { 228 | act -= evt; 229 | if (act == null) 230 | mEventMap.Remove(evtName); 231 | else 232 | mEventMap[evtName] = act; 233 | } 234 | else 235 | throw new Exception("EventDispatch evt type is null"); 236 | } 237 | } 238 | 239 | public void TriggerEvent(string evtName) 240 | { 241 | if (mEventMap == null) 242 | return; 243 | 244 | Delegate evts; 245 | if (mEventMap.TryGetValue(evtName, out evts)) 246 | { 247 | Delegate[] list = evts.GetInvocationList(); 248 | for (int i = 0; i < list.Length; ++i) 249 | { 250 | Action act = list[i] as Action; 251 | if (act != null) 252 | act(); 253 | } 254 | } 255 | } 256 | 257 | public void TriggerEvent(string evtName, T V1) 258 | { 259 | if (mEventMap == null) 260 | return; 261 | 262 | Delegate evts; 263 | if (mEventMap.TryGetValue(evtName, out evts)) 264 | { 265 | Delegate[] list = evts.GetInvocationList(); 266 | for (int i = 0; i < list.Length; ++i) 267 | { 268 | Action act = list[i] as Action; 269 | if (act != null) 270 | act(V1); 271 | } 272 | } 273 | } 274 | 275 | public void TriggerEvent(string evtName, T V1, U V2) 276 | { 277 | if (mEventMap == null) 278 | return; 279 | 280 | Delegate evts; 281 | if (mEventMap.TryGetValue(evtName, out evts)) 282 | { 283 | Delegate[] list = evts.GetInvocationList(); 284 | for (int i = 0; i < list.Length; ++i) 285 | { 286 | Action act = list[i] as Action; 287 | if (act != null) 288 | act(V1, V2); 289 | } 290 | } 291 | } 292 | 293 | public void TriggerEvent(string evtName, T V1, U V2, V V3) 294 | { 295 | if (mEventMap == null) 296 | return; 297 | 298 | Delegate evts; 299 | if (mEventMap.TryGetValue(evtName, out evts)) 300 | { 301 | Delegate[] list = evts.GetInvocationList(); 302 | for (int i = 0; i < list.Length; ++i) 303 | { 304 | Action act = list[i] as Action; 305 | if (act != null) 306 | act(V1, V2, V3); 307 | } 308 | } 309 | } 310 | 311 | public void TriggerEvent(string evtName, T V1, U V2, V V3, W V4) 312 | { 313 | if (mEventMap == null) 314 | return; 315 | 316 | Delegate evts; 317 | if (mEventMap.TryGetValue(evtName, out evts)) 318 | { 319 | Delegate[] list = evts.GetInvocationList(); 320 | for (int i = 0; i < list.Length; ++i) 321 | { 322 | Action act = list[i] as Action; 323 | if (act != null) 324 | act(V1, V2, V3, V4); 325 | } 326 | } 327 | } 328 | 329 | // event Name, function 330 | private Dictionary mEventMap = null; 331 | } 332 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/util/EventManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e593de836dcf51c46aa5191c72f8aff5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/util/Singleton.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public sealed class Singleton 6 | { 7 | private static Singleton _instance = null; 8 | private static readonly object SynObject = new object(); 9 | 10 | Singleton() 11 | { 12 | } 13 | 14 | /// 15 | /// Gets the instance. 16 | /// 17 | public static Singleton Instance 18 | { 19 | get 20 | { 21 | // Syn operation. 22 | lock (SynObject) 23 | { 24 | return _instance ?? (_instance = new Singleton()); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/manager/util/Singleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b086d8712b815544f9c66643218842c9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dfa0f7ec3b8a8646945196086a47574 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/AppFacade.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class AppFacade : Facade 6 | { 7 | private static AppFacade _instance; 8 | 9 | public AppFacade() : base() 10 | { 11 | } 12 | 13 | public static AppFacade Instance 14 | { 15 | get 16 | { 17 | if (_instance == null) 18 | { 19 | _instance = new AppFacade(); 20 | } 21 | return _instance; 22 | } 23 | } 24 | 25 | override protected void InitFramework() 26 | { 27 | base.InitFramework(); 28 | RegisterCommand(NotiConst.START_UP, typeof(StartUpCommand)); 29 | } 30 | 31 | public void StartUp() 32 | { 33 | SendMessageCommand(NotiConst.START_UP); 34 | RemoveMultiCommand(NotiConst.START_UP); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/AppFacade.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b1b812093d35e141b6ad504f1082388 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/Base.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Base : MonoBehaviour 6 | { 7 | private AppFacade m_Facade; 8 | private TimerManager m_TimerMgr; 9 | 10 | 11 | /// 12 | /// 注册消息 13 | /// 14 | /// 15 | /// 16 | protected void RegisterMessage(IView view, List messages) 17 | { 18 | if (messages == null || messages.Count == 0) return; 19 | Controller.Instance.RegisterViewCommand(view, messages.ToArray()); 20 | } 21 | 22 | /// 23 | /// 移除消息 24 | /// 25 | /// 26 | /// 27 | protected void RemoveMessage(IView view, List messages) 28 | { 29 | if (messages == null || messages.Count == 0) return; 30 | Controller.Instance.RemoveViewCommand(view, messages.ToArray()); 31 | } 32 | 33 | protected AppFacade facade 34 | { 35 | get 36 | { 37 | if (m_Facade == null) 38 | { 39 | m_Facade = AppFacade.Instance; 40 | } 41 | return m_Facade; 42 | } 43 | } 44 | 45 | protected TimerManager TimerManager 46 | { 47 | get 48 | { 49 | if (m_TimerMgr == null) 50 | { 51 | m_TimerMgr = facade.GetManager(ManagerName.Timer); 52 | } 53 | return m_TimerMgr; 54 | } 55 | } 56 | 57 | // Start is called before the first frame update 58 | void Start() 59 | { 60 | 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/Base.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0624d9df28121784181cca8c51ad47a1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/Controller.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | public class Controller : IController 6 | { 7 | protected IDictionary m_commandMap; 8 | protected IDictionary> m_viewCmdMap; 9 | 10 | protected static volatile IController m_instance; 11 | protected readonly object m_syncRoot = new object(); 12 | protected static readonly object m_staticSyncRoot = new object(); 13 | 14 | protected Controller() 15 | { 16 | InitializeController(); 17 | } 18 | 19 | static Controller() 20 | { 21 | } 22 | 23 | public static IController Instance 24 | { 25 | get 26 | { 27 | if (m_instance == null) 28 | { 29 | lock (m_staticSyncRoot) 30 | { 31 | if (m_instance == null) m_instance = new Controller(); 32 | } 33 | } 34 | return m_instance; 35 | } 36 | } 37 | 38 | protected virtual void InitializeController() 39 | { 40 | m_commandMap = new Dictionary(); 41 | m_viewCmdMap = new Dictionary>(); 42 | } 43 | 44 | public virtual void ExecuteCommand(IMessage note) 45 | { 46 | Type commandType = null; 47 | List views = null; 48 | lock (m_syncRoot) 49 | { 50 | if (m_commandMap.ContainsKey(note.Name)) 51 | { 52 | commandType = m_commandMap[note.Name]; 53 | } 54 | else 55 | { 56 | views = new List(); 57 | foreach (var de in m_viewCmdMap) 58 | { 59 | if (de.Value.Contains(note.Name)) 60 | { 61 | views.Add(de.Key); 62 | } 63 | } 64 | } 65 | } 66 | if (commandType != null) 67 | { //Controller 68 | object commandInstance = Activator.CreateInstance(commandType); 69 | if (commandInstance is ICommand) 70 | { 71 | ((ICommand)commandInstance).Execute(note); 72 | } 73 | } 74 | if (views != null && views.Count > 0) 75 | { 76 | for (int i = 0; i < views.Count; i++) 77 | { 78 | views[i].OnMessage(note); 79 | } 80 | views = null; 81 | } 82 | } 83 | 84 | public virtual void RegisterCommand(string commandName, Type commandType) 85 | { 86 | lock (m_syncRoot) 87 | { 88 | m_commandMap[commandName] = commandType; 89 | } 90 | } 91 | 92 | public virtual void RegisterViewCommand(IView view, string[] commandNames) 93 | { 94 | lock (m_syncRoot) 95 | { 96 | if (m_viewCmdMap.ContainsKey(view)) 97 | { 98 | List list = null; 99 | if (m_viewCmdMap.TryGetValue(view, out list)) 100 | { 101 | for (int i = 0; i < commandNames.Length; i++) 102 | { 103 | if (list.Contains(commandNames[i])) continue; 104 | list.Add(commandNames[i]); 105 | } 106 | } 107 | } 108 | else 109 | { 110 | m_viewCmdMap.Add(view, new List(commandNames)); 111 | } 112 | } 113 | } 114 | 115 | public virtual bool HasCommand(string commandName) 116 | { 117 | lock (m_syncRoot) 118 | { 119 | return m_commandMap.ContainsKey(commandName); 120 | } 121 | } 122 | 123 | public virtual void RemoveCommand(string commandName) 124 | { 125 | lock (m_syncRoot) 126 | { 127 | if (m_commandMap.ContainsKey(commandName)) 128 | { 129 | m_commandMap.Remove(commandName); 130 | } 131 | } 132 | } 133 | 134 | public virtual void RemoveViewCommand(IView view, string[] commandNames) 135 | { 136 | lock (m_syncRoot) 137 | { 138 | if (m_viewCmdMap.ContainsKey(view)) 139 | { 140 | List list = null; 141 | if (m_viewCmdMap.TryGetValue(view, out list)) 142 | { 143 | for (int i = 0; i < commandNames.Length; i++) 144 | { 145 | if (!list.Contains(commandNames[i])) continue; 146 | list.Remove(commandNames[i]); 147 | } 148 | } 149 | } 150 | } 151 | } 152 | } 153 | 154 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/Controller.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58460f3f6f8d24a489f6c2b2289fca0e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/Facade.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | /// 7 | /// 事件命令 8 | /// 9 | public class ControllerCommand : ICommand 10 | { 11 | public virtual void Execute(IMessage message) 12 | { 13 | } 14 | } 15 | 16 | public class Facade 17 | { 18 | protected IController m_controller; 19 | static GameObject m_GameManager; 20 | static Dictionary m_Managers = new Dictionary(); 21 | 22 | GameObject AppGameManager 23 | { 24 | get 25 | { 26 | if (m_GameManager == null) 27 | { 28 | m_GameManager = GameObject.Find("GameManager"); 29 | } 30 | return m_GameManager; 31 | } 32 | } 33 | 34 | protected Facade() 35 | { 36 | InitFramework(); 37 | } 38 | protected virtual void InitFramework() 39 | { 40 | if (m_controller != null) return; 41 | m_controller = Controller.Instance; 42 | } 43 | 44 | public virtual void RegisterCommand(string commandName, Type commandType) 45 | { 46 | m_controller.RegisterCommand(commandName, commandType); 47 | } 48 | 49 | public virtual void RemoveCommand(string commandName) 50 | { 51 | m_controller.RemoveCommand(commandName); 52 | } 53 | 54 | public virtual bool HasCommand(string commandName) 55 | { 56 | return m_controller.HasCommand(commandName); 57 | } 58 | 59 | public void RegisterMultiCommand(Type commandType, params string[] commandNames) 60 | { 61 | int count = commandNames.Length; 62 | for (int i = 0; i < count; i++) 63 | { 64 | RegisterCommand(commandNames[i], commandType); 65 | } 66 | } 67 | 68 | public void RemoveMultiCommand(params string[] commandName) 69 | { 70 | int count = commandName.Length; 71 | for (int i = 0; i < count; i++) 72 | { 73 | RemoveCommand(commandName[i]); 74 | } 75 | } 76 | 77 | public void SendMessageCommand(string message, object body = null) 78 | { 79 | m_controller.ExecuteCommand(new Message(message, body)); 80 | } 81 | 82 | /// 83 | /// 添加管理器 84 | /// 85 | public void AddManager(string typeName, object obj) 86 | { 87 | if (!m_Managers.ContainsKey(typeName)) 88 | { 89 | m_Managers.Add(typeName, obj); 90 | } 91 | } 92 | 93 | /// 94 | /// 添加Unity对象 95 | /// 96 | public T AddManager(string typeName) where T : Component 97 | { 98 | object result = null; 99 | m_Managers.TryGetValue(typeName, out result); 100 | if (result != null) 101 | { 102 | return (T)result; 103 | } 104 | Component c = AppGameManager.AddComponent(); 105 | m_Managers.Add(typeName, c); 106 | return default(T); 107 | } 108 | 109 | /// 110 | /// 获取系统管理器 111 | /// 112 | public T GetManager(string typeName) where T : class 113 | { 114 | if (!m_Managers.ContainsKey(typeName)) 115 | { 116 | return default(T); 117 | } 118 | object manager = null; 119 | m_Managers.TryGetValue(typeName, out manager); 120 | return (T)manager; 121 | } 122 | 123 | /// 124 | /// 删除管理器 125 | /// 126 | public void RemoveManager(string typeName) 127 | { 128 | if (!m_Managers.ContainsKey(typeName)) 129 | { 130 | return; 131 | } 132 | object manager = null; 133 | m_Managers.TryGetValue(typeName, out manager); 134 | Type type = manager.GetType(); 135 | if (type.IsSubclassOf(typeof(MonoBehaviour))) 136 | { 137 | GameObject.Destroy((Component)manager); 138 | } 139 | m_Managers.Remove(typeName); 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/Facade.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6168a5b0092cbc4abebd45879b3c075 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/GameManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class GameManager : Manager 6 | { 7 | // Start is called before the first frame update 8 | void Awake() 9 | { 10 | Init(); 11 | } 12 | 13 | /// 14 | /// 初始化 15 | /// 16 | void Init() 17 | { 18 | DontDestroyOnLoad(gameObject); //防止销毁自己 19 | Screen.sleepTimeout = SleepTimeout.NeverSleep; 20 | Application.targetFrameRate = AppConst.GameFrameRate; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/GameManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0382c4c1d8433545bc98d87613a2920 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/ICommand.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public interface ICommand 6 | { 7 | void Execute(IMessage message); 8 | } 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/ICommand.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bfdfeaf813dd2e4c913cdadc9628d63 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/IController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | public interface IController 7 | { 8 | /// 9 | /// 注册Controller 事件 10 | /// 11 | /// 12 | /// 13 | void RegisterCommand(string messageName, Type commandType); 14 | 15 | /// 16 | /// 注册事件 17 | /// 18 | /// 19 | /// 20 | void RegisterViewCommand(IView view, string[] commandNames); 21 | 22 | /// 23 | /// 执行事件 24 | /// 25 | /// 26 | void ExecuteCommand(IMessage message); 27 | 28 | /// 29 | ///移除事件 30 | /// 31 | /// 32 | void RemoveCommand(string messageName); 33 | 34 | /// 35 | /// 移除 36 | /// 37 | /// 38 | /// 39 | void RemoveViewCommand(IView view, string[] commandNames); 40 | 41 | /// 42 | /// 是否含有 43 | /// 44 | /// 45 | /// 46 | bool HasCommand(string messageName); 47 | } 48 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/IController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: adc47b4b06354664ca16d00827eb4119 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/IMessage.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public interface IMessage 6 | { 7 | string Name { get; } 8 | 9 | object Body { get; set; } 10 | 11 | string Type { get; set; } 12 | 13 | string ToString(); 14 | } 15 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/IMessage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd0d44eee1ba1cc4283f628c3494406c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/IView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public interface IView 6 | { 7 | /// 8 | /// View 层 9 | /// 10 | /// 11 | void OnMessage(IMessage message); 12 | } 13 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/IView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cd2c4dcd44789d4f95371a657a1ee71 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/Message.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using System; 6 | public class Message : IMessage 7 | { 8 | public Message(string name) 9 | : this(name, null, null) 10 | { } 11 | 12 | public Message(string name, object body) 13 | : this(name, body, null) 14 | { } 15 | 16 | public Message(string name, object body, string type) 17 | { 18 | m_name = name; 19 | m_body = body; 20 | m_type = type; 21 | } 22 | 23 | /// 24 | /// Get the string representation of the Notification instance 25 | /// 26 | /// The string representation of the Notification instance 27 | public override string ToString() 28 | { 29 | string msg = "Notification Name: " + Name; 30 | msg += "\nBody:" + ((Body == null) ? "null" : Body.ToString()); 31 | msg += "\nType:" + ((Type == null) ? "null" : Type); 32 | return msg; 33 | } 34 | 35 | /// 36 | /// The name of the Notification instance 37 | /// 38 | public virtual string Name 39 | { 40 | get { return m_name; } 41 | } 42 | 43 | /// 44 | /// The body of the Notification instance 45 | /// 46 | /// This accessor is thread safe 47 | public virtual object Body 48 | { 49 | get 50 | { 51 | // Setting and getting of reference types is atomic, no need to lock here 52 | return m_body; 53 | } 54 | set 55 | { 56 | // Setting and getting of reference types is atomic, no need to lock here 57 | m_body = value; 58 | } 59 | } 60 | 61 | /// 62 | /// The type of the Notification instance 63 | /// 64 | /// This accessor is thread safe 65 | public virtual string Type 66 | { 67 | get 68 | { 69 | // Setting and getting of reference types is atomic, no need to lock here 70 | return m_type; 71 | } 72 | set 73 | { 74 | // Setting and getting of reference types is atomic, no need to lock here 75 | m_type = value; 76 | } 77 | } 78 | 79 | /// 80 | /// The name of the notification instance 81 | /// 82 | private string m_name; 83 | 84 | /// 85 | /// The type of the notification instance 86 | /// 87 | private string m_type; 88 | 89 | /// 90 | /// The body of the notification instance 91 | /// 92 | private object m_body; 93 | } 94 | 95 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/Message.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11cfa7025aca07a41be95b290847593a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/NotiConst.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class NotiConst 6 | { 7 | /// 8 | /// Controller层消息通知 9 | /// 10 | public const string START_UP = "StartUp"; //启动框架 11 | } 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/NotiConst.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bfe661c928e2d04b92a66d83c8eb936 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/StartUpCommand.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class StartUpCommand : ControllerCommand 6 | { 7 | public override void Execute(IMessage message) 8 | { 9 | AppFacade.Instance.AddManager(ManagerName.Timer); 10 | AppFacade.Instance.AddManager(ManagerName.NetWorkMgr); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/mvc/StartUpCommand.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83954ffa642f1014d9dded3008f1015f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0bd8de536f2493438c284c9f53e9028 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3690b5769501e524bb81dd433e0ed751 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/SockProxy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Net; 5 | using System.Net.Sockets; 6 | using System.Threading; 7 | using UnityEngine; 8 | 9 | public class SockProxy : INetWork 10 | { 11 | public Socket socket; 12 | 13 | /// 14 | /// 配置数据 15 | /// 16 | public TConfig tConfig = null; 17 | 18 | /// 19 | /// 用于多线程的处理 20 | /// 21 | public Thread socketThread = null; 22 | 23 | /// 24 | /// 连接端口 25 | /// 26 | public IPEndPoint endPoint; 27 | 28 | /// 29 | /// socket 类型 30 | /// 31 | public ProtocolType protocolType = ProtocolType.Unknown; 32 | 33 | /// 34 | /// 定义的接收缓冲区大小 35 | /// 36 | public int bufferSize = 1024; 37 | 38 | /// 39 | /// 用于发送数据的SocketAsyncEventArgs 40 | /// 41 | public SocketAsyncEventArgs sendEventArg = null; 42 | 43 | 44 | /// 45 | /// 用于接收数据的SocketAsyncEventArgs 46 | /// 47 | public SocketAsyncEventArgs recvEventArg = null; 48 | 49 | 50 | /// 51 | /// 接受缓存数组 52 | /// 53 | private byte[] recvBuff = null; 54 | /// 55 | /// 发送缓存数组 56 | /// 57 | private byte[] sendBuff = null; 58 | 59 | 60 | public virtual void Dispose() 61 | { 62 | 63 | } 64 | 65 | public void InitLize(NetConfig netConfig) 66 | { 67 | tConfig = (TConfig)netConfig; 68 | } 69 | 70 | public virtual void Send(NetSendModel netSendModel) 71 | { 72 | 73 | } 74 | 75 | public virtual bool Start() 76 | { 77 | if(tConfig.ip.Length == 0) { 78 | 79 | Log("Ip 地址不能为空,暂时只支持 IPV4 配置IP地址为:{0}",tConfig.ip); 80 | return false; 81 | } 82 | //创建连接终点 83 | endPoint = new IPEndPoint(IPAddress.Parse(tConfig.ip),tConfig.port); 84 | switch (protocolType) 85 | { 86 | case ProtocolType.Tcp: 87 | socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); 88 | break; 89 | case ProtocolType.Udp: 90 | socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 91 | break; 92 | default: 93 | Log("暂不支持 除TCP UDP 之外的连接,你选择的连接为:{0}", protocolType.ToString()); 94 | return false; 95 | } 96 | sendBuff = new byte[bufferSize]; 97 | 98 | recvBuff = new byte[bufferSize]; 99 | 100 | 101 | Log("{0} Socket 创建成功! 准备多线程连接",DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); 102 | return true; 103 | } 104 | 105 | 106 | /// 107 | /// 填充接收/发送对象实例 108 | /// 109 | public void FillSendAndRecvAsyncData(System.EventHandler eventHandler) 110 | { 111 | sendEventArg = new SocketAsyncEventArgs(); 112 | sendEventArg.SetBuffer(sendBuff, 0, bufferSize); 113 | sendEventArg.Completed += eventHandler; 114 | recvEventArg = new SocketAsyncEventArgs(); 115 | recvEventArg.SetBuffer(recvBuff, 0, bufferSize); 116 | recvEventArg.Completed += eventHandler; 117 | } 118 | 119 | /// 120 | /// 打印 121 | /// 122 | /// 123 | /// 124 | public void Log(string message,params object [] param) 125 | { 126 | Debug.Log(string.Format(message,param)); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/SockProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0421bd1c69277c9428e70764092d4e8e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 708267eb45c206046aa37d269474a12f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/SockType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using static BytesUtils; 5 | 6 | /// 7 | /// 回调类型 8 | /// 9 | public enum SockType : int 10 | { 11 | ChannelActive = 1, 12 | ChannelRegistered = 2, 13 | ChannelUnregistered = 3, 14 | ChannelRead = 4, 15 | ChannelResetRegistered = 5, 16 | ChannelConnectionFail = 6, 17 | ChannelWillBreak = 7 18 | } 19 | 20 | /// 21 | /// 返回的数据 22 | /// 23 | public class NetCoreBackData 24 | { 25 | /// 26 | /// socket 回调类型 27 | /// 28 | public SockType sockType { get; set; } 29 | 30 | /// 31 | /// 整数,lua 调用 32 | /// 33 | public int _sockType { get { return System.Convert.ToInt32(sockType); } } 34 | 35 | /// 36 | /// 返回的消息体 37 | /// 38 | public NetSerialize netSerialize { get; set; } 39 | } -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/SockType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a23e32cb8ea236d4b89fe269bc63996c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/TConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class TConfig : NetConfig 6 | { 7 | /// 8 | /// ip 地址 9 | /// 10 | public string ip { get; set; } 11 | 12 | /// 13 | /// 连接端口 14 | /// 15 | public int port { get; set; } 16 | 17 | /// 18 | /// socket 名称 19 | /// 20 | public string name { get; set; } 21 | } 22 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/TConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61a093f6af657ef438c027551f077e89 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/TSendModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class TSendModel : NetSendModel 6 | { 7 | /// 8 | /// 消息ID 9 | /// 10 | public short msgId { get; set; } 11 | 12 | /// 13 | /// 发送字节流 14 | /// 15 | public byte [] array { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/TSendModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 508e07e2c3b45f54b88d52b1407a0f12 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/TSock.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System.Net.Sockets; 5 | using System.Threading.Tasks; 6 | using System.Threading; 7 | using System; 8 | 9 | public class TSock : TSocketClient 10 | { 11 | 12 | 13 | /// 14 | /// 构造函数 15 | /// 16 | /// Socket基础配置 17 | /// Socket 类型,默认为TCP 18 | /// 是否重连 19 | /// 重连间隔 20 | /// 自定义的缓冲区大小, 21 | /// 自定义回调, 22 | public TSock(TConfig tConfig, ISocketMessage socketMessage,ProtocolType protocolType = ProtocolType.Tcp, bool autoconnec = true,int autoConnecSecond = 1000,int bufferSize=1024) 23 | { 24 | this.bufferSize = bufferSize; 25 | this.socketMessage = socketMessage; 26 | InitLize(tConfig); 27 | this.autoConnecSecond = autoConnecSecond; 28 | this.protocolType = protocolType; 29 | this.autoconnec = autoconnec; 30 | } 31 | 32 | 33 | /// 34 | /// 启动socket 35 | /// 36 | /// 37 | public override bool Start() 38 | { 39 | var connstate = base.Start(); 40 | if(connstate == false) 41 | { 42 | return false; 43 | } 44 | FillSendAndRecvAsyncData(IO_Completed); 45 | Action(); 46 | return true; 47 | } 48 | 49 | 50 | /// 51 | /// 启动Socket 进程 52 | /// 53 | private void Action() 54 | { 55 | try 56 | { 57 | isConnecing = true; 58 | SocketAsyncEventArgs connectEventArg = new SocketAsyncEventArgs(); 59 | connectEventArg.Completed += new System.EventHandler(ConnectEventArgs_Completed); 60 | connectEventArg.RemoteEndPoint = endPoint; 61 | bool willRaiseEvent = socket.ConnectAsync(connectEventArg); 62 | if (!willRaiseEvent) 63 | { 64 | ProcessConnect(connectEventArg); 65 | } 66 | } 67 | catch (System.Exception e) 68 | { 69 | Log("连接失败:ip = {0} ,port = {1}", tConfig.ip, tConfig.port); 70 | setCallBack(new NetCoreBackData() { sockType = isFirstConnec ? SockType.ChannelRegistered : SockType.ChannelResetRegistered }); 71 | } 72 | } 73 | 74 | 75 | /// 76 | /// 连接事件 77 | /// 78 | /// 79 | private void ConnectEventArgs_Completed(object sender, SocketAsyncEventArgs socketAsyncEventArgs) 80 | { 81 | if(socketAsyncEventArgs.SocketError == SocketError.Success) 82 | { 83 | Log("连接服务器成功! {0}", isFirstConnec ? "首次连接" : "断线重连"); 84 | setCallBack(new NetCoreBackData() { sockType = isFirstConnec? SockType.ChannelRegistered: SockType.ChannelResetRegistered}); 85 | isFirstConnec = true; 86 | isConnection = true; 87 | isConnecing = false; 88 | StartRecv(); 89 | } 90 | else 91 | { 92 | isConnecing = false; 93 | Log("连接服务器失败! {0}", socketAsyncEventArgs.SocketError); 94 | setCallBack(new NetCoreBackData() { sockType = SockType.ChannelConnectionFail}); 95 | ResetConnection(); 96 | } 97 | } 98 | 99 | /// 100 | /// 销毁进程 101 | /// 102 | public override void Dispose() 103 | { 104 | base.Dispose(); 105 | autoconnec = false; //禁止重连 106 | if (socket != null) { socket.Close(); } 107 | bytesUtils.Dispose(); 108 | sendEventArg.SetBuffer(null, 0, 0); 109 | recvEventArg.SetBuffer(null, 0, 0); 110 | 111 | } 112 | 113 | /// 114 | /// 设置自动重连 115 | /// 116 | /// 117 | public void setAutoConnection(bool b) 118 | { 119 | autoconnec = b; 120 | } 121 | 122 | /// 123 | /// 重连 124 | /// 125 | public void ResetConnection() 126 | { 127 | if (autoconnec == false) { 128 | Log("用户禁止重连,{0}", autoconnec); 129 | return; 130 | } 131 | ///如果没有连接。就返回 132 | if (isConnecing == true) 133 | { 134 | return; 135 | } 136 | isConnecing = true; 137 | isConnection = false; 138 | Thread.Sleep(autoConnecSecond); 139 | if (socket != null) { socket.Close(); } 140 | Start(); 141 | } 142 | 143 | /// 144 | /// 发送,接收完毕调用的函数 145 | /// 146 | /// 147 | /// 148 | private void IO_Completed(object sender, SocketAsyncEventArgs e) 149 | { 150 | switch (e.LastOperation) 151 | { 152 | case SocketAsyncOperation.Send: 153 | 154 | ProcessSend (e); 155 | 156 | break; 157 | 158 | case SocketAsyncOperation.Receive: 159 | 160 | ProcessReceive(e); 161 | 162 | break; 163 | } 164 | 165 | } 166 | 167 | /// 168 | /// 接收函数 169 | /// 170 | /// 171 | private void ProcessReceive(SocketAsyncEventArgs e) 172 | { 173 | //如果接收正常 174 | if(e.SocketError == SocketError.Success && e.BytesTransferred > 0) 175 | { 176 | byte[] buff = new byte[e.BytesTransferred]; 177 | Buffer.BlockCopy(e.Buffer, 0, buff, 0, buff.Length); 178 | var msgList = bytesUtils.DecodePackage(buff); 179 | //否则,继续请求接收 180 | for (int i = 0; i < msgList.Count; i++) 181 | { 182 | var mdata = msgList[i]; 183 | setCallBack(new NetCoreBackData() { sockType = SockType.ChannelRead, netSerialize = mdata}); 184 | } 185 | StartRecv(); 186 | } 187 | //异常直接进行重连请求 188 | else 189 | { 190 | setCallBack(new NetCoreBackData() { sockType = SockType.ChannelWillBreak }); 191 | ResetConnection(); 192 | } 193 | } 194 | 195 | 196 | /// 197 | /// 发送函数 198 | /// 199 | /// 200 | private void ProcessSend(SocketAsyncEventArgs e) 201 | { 202 | //如果发送正常。代表发送成功! 203 | if(e.SocketError == SocketError.Success) 204 | { 205 | Log("消息发送成功!"); 206 | } 207 | else 208 | { 209 | Log("发送异常,请进行重连 {0}", e.SocketError); 210 | setCallBack(new NetCoreBackData() { sockType = SockType.ChannelWillBreak }); 211 | ResetConnection(); 212 | } 213 | } 214 | 215 | /// 216 | /// 连接成功响应事件 217 | /// 218 | /// 219 | private void ProcessConnect(SocketAsyncEventArgs e) 220 | { 221 | StartRecv(); 222 | } 223 | 224 | 225 | /// 226 | /// 开始准备接受服务器消息 227 | /// 228 | private void StartRecv() 229 | { 230 | bool willRaiseEvent = socket.ReceiveAsync(recvEventArg); 231 | if (!willRaiseEvent) 232 | { 233 | ProcessReceive(recvEventArg); 234 | } 235 | } 236 | 237 | /// 238 | /// 发送消息给服务器 239 | /// 240 | /// 241 | public override void Send(NetSendModel netSendModel) 242 | { 243 | if (isConnection == false) 244 | { 245 | Log("服务器未连接,请先连接服务器"); 246 | return; 247 | } 248 | TSendModel sendModel = (TSendModel)netSendModel; 249 | BytesUtils bytesUtils = new BytesUtils(sendModel.msgId, sendModel.array); 250 | var buff = bytesUtils.toArray(); 251 | sendEventArg.SetBuffer(buff, 0, buff.Length); 252 | bool willRaiseEvent = socket.SendAsync(sendEventArg); 253 | if (!willRaiseEvent) 254 | { 255 | ProcessSend(sendEventArg); 256 | } 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/TSock.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5454a801639ad2341b6c66a007b2f5da 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/TSocketClient.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Net.Sockets; 4 | using UnityEngine; 5 | 6 | /// 7 | /// TCP 客户端连接实例 8 | /// 9 | public class TSocketClient : SockProxy 10 | { 11 | /// 12 | /// 是否自动重连 13 | /// 14 | public bool autoconnec = true; 15 | 16 | /// 17 | /// 是否首次连接 18 | /// 19 | public bool isFirstConnec = true; 20 | 21 | /// 22 | /// 是否连接中 23 | /// 24 | public bool isConnection = false; 25 | 26 | /// 27 | /// 是否连接中 28 | /// 29 | public bool isConnecing = false; 30 | 31 | /// 32 | /// 自动重连事件 33 | /// 34 | public int autoConnecSecond = 1000; 35 | 36 | 37 | public ISocketMessage socketMessage = null; 38 | 39 | /// 40 | /// 接受字节 41 | /// 42 | public BytesUtils bytesUtils = new BytesUtils(new byte[0]); 43 | 44 | /// 45 | /// 设置回调 46 | /// 47 | /// 48 | public virtual void setCallBack(NetCoreBackData netCoreBackData) 49 | { 50 | if (socketMessage != null) 51 | { 52 | socketMessage.NetCoreCallBack(netCoreBackData); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/socket/tcp/TSocketClient.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0af86c913a908c94d87e6a865409bcfb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e50215f33950904449f0cce994cf43ec 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 103dda7068e3e394fbbb5e1bf92809d1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/BytesUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using UnityEngine; 6 | 7 | /// 8 | /// 编码解码类 9 | /// 10 | public class BytesUtils:IDisposable 11 | { 12 | /// 13 | /// 实体参数 14 | /// 15 | private byte[] array = null; 16 | 17 | /// 18 | /// 是否成功! 19 | /// 20 | public bool success = true; 21 | 22 | /// 23 | /// 消息ID 24 | /// 25 | private short msgId { get; set; } 26 | 27 | /// 28 | /// 消息头 29 | /// 30 | public byte msgHead = 0x09; 31 | 32 | 33 | /// 34 | /// 用于加锁 35 | /// 36 | private Hashtable hashtable = new Hashtable(); 37 | 38 | /// 39 | /// 构造函数 40 | /// 41 | /// 42 | public BytesUtils(byte[] array) 43 | { 44 | this.array = array; 45 | } 46 | 47 | /// 48 | /// 构造 49 | /// 50 | public BytesUtils() 51 | { 52 | 53 | } 54 | 55 | /// 56 | /// 解包 57 | /// 58 | /// 59 | public List DecodePackage(byte [] content) 60 | { 61 | List netSerializes = new List(); 62 | //定义字节偏移,因为TCP可能出现粘包问题,所以务必要进行拆包 63 | lock (hashtable) //因为可能解包的时候有新消息,所以务必将此缓冲Buff 加锁 64 | { 65 | //组合新数组 66 | using(MemoryStream memoryStream = new MemoryStream()) 67 | { 68 | memoryStream.Write(array, 0, array.Length); //写入历史包 69 | memoryStream.Write(content, 0, content.Length); //写入最新的包 70 | array = memoryStream.ToArray(); //这里就是最终的数据 71 | //memoryStream.Dispose(); 72 | } 73 | //开始处理buff 数据 74 | while (true) //循环解析消息 75 | { 76 | int offect = 0; 77 | var head = ReadByte(offect); 78 | if(head!= msgHead) //如果消息头不存在,就不对。 79 | { 80 | break; 81 | } 82 | offect += 1; 83 | NetSerialize serialize = new NetSerialize() { msgId = ReadShort(offect) }; 84 | offect += 2; 85 | int msgLen = ReadInt(offect); //读取消息长度 86 | offect += 4; //继续偏移 87 | serialize.content = ReadContent(offect,msgLen); 88 | offect += msgLen; 89 | netSerializes.Add(serialize); 90 | //将array 从新赋值。 91 | var buffer = new byte[array.Length - offect]; //这里就是剩余的包 92 | if(buffer.Length == 0) //如果是一个整包,就直接返回即可 93 | { 94 | array = new byte[0]; 95 | break; 96 | } 97 | //否则,就将剩余包拷贝,等下下次处理 98 | Buffer.BlockCopy(array, offect, buffer, 0, buffer.Length); //剩余的包 99 | array = buffer; 100 | } 101 | return netSerializes; 102 | } 103 | } 104 | 105 | /// 106 | /// 构造 107 | /// 108 | /// 109 | /// 110 | public BytesUtils(short netId, byte[] array) 111 | { 112 | this.array = array; 113 | this.msgId = netId; 114 | } 115 | 116 | /// 117 | /// 转换 118 | /// 119 | /// 120 | public byte[] toArray() 121 | { 122 | using (MemoryStream memoryStream = new MemoryStream()) 123 | { 124 | //写入消息头 125 | memoryStream.WriteByte(msgHead); 126 | //写入命令 127 | var netShort = BitConverter.GetBytes(msgId); 128 | memoryStream.Write(netShort, 0, netShort.Length); 129 | //写入字节长度 130 | var netLen = BitConverter.GetBytes(array.Length); 131 | memoryStream.Write(netLen, 0, netLen.Length); 132 | //写入消息体 133 | memoryStream.Write(array, 0, array.Length); 134 | return memoryStream.ToArray(); 135 | } 136 | } 137 | 138 | /// 139 | /// 读取一个字节 140 | /// 141 | /// 142 | /// 143 | public byte ReadByte(int startIndex = 0) 144 | { 145 | try 146 | { 147 | return array[startIndex]; 148 | } 149 | catch (Exception e) 150 | { 151 | success = false; 152 | Console.WriteLine("ReadByte 数组越界!"); 153 | return 0; 154 | } 155 | } 156 | 157 | /// 158 | /// 读取short 159 | /// 160 | /// 161 | /// 162 | public short ReadShort(int startIndex = 0) 163 | { 164 | try 165 | { 166 | byte[] content = new byte[2]; 167 | Buffer.BlockCopy(array, startIndex, content, 0, content.Length); 168 | return BitConverter.ToInt16(content, 0); 169 | } 170 | catch (Exception) 171 | { 172 | success = false; 173 | Console.WriteLine("ReadShort 数组越界!"); 174 | return 0; 175 | } 176 | } 177 | 178 | /// 179 | /// 读取int 180 | /// 181 | /// 182 | /// 183 | public int ReadInt(int startIndex = 0) 184 | { 185 | try 186 | { 187 | byte[] content = new byte[4]; 188 | Buffer.BlockCopy(array, startIndex, content, 0, content.Length); 189 | return BitConverter.ToInt32(content,0); 190 | } 191 | catch (Exception) 192 | { 193 | success = false; 194 | return 0; 195 | } 196 | } 197 | 198 | /// 199 | /// 读消息 200 | /// 201 | /// 202 | /// 203 | public byte[] ReadContent(int startIndex = 0,int length = 0) 204 | { 205 | byte[] content = new byte[length]; 206 | try 207 | { 208 | Buffer.BlockCopy(array, startIndex, content, 0, length); 209 | return content; 210 | } 211 | catch (Exception e) 212 | { 213 | success = false; 214 | return content; 215 | } 216 | } 217 | 218 | public void Dispose() 219 | { 220 | array = null; 221 | } 222 | 223 | /// 224 | /// 消息编码 225 | /// 226 | public class NetSerialize 227 | { 228 | /// 229 | /// 消息头 0x07 230 | /// 231 | public byte head { get; set; } 232 | 233 | 234 | /// 235 | /// 消息号 236 | /// 237 | public short msgId { get; set; } 238 | 239 | 240 | /// 241 | /// 消息内容 242 | /// 243 | public byte[] content { get; set; } 244 | } 245 | } 246 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/BytesUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98c191e4b7a8c3545bd51b072743d85d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/INetWork.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | /// 6 | /// 网络使用接口,HTTP,UDP,TCP,均需集成此接口 7 | /// 8 | public interface INetWork 9 | { 10 | /// 11 | /// 定义初始化接口 12 | /// 13 | /// 14 | void InitLize(NetConfig netConfig); 15 | 16 | /// 17 | /// 开启进程 18 | /// 19 | bool Start(); 20 | 21 | /// 22 | /// 销毁进程 23 | /// 24 | void Dispose(); 25 | 26 | /// 27 | /// 定义发送接口 28 | /// 29 | /// 30 | void Send(NetSendModel netSendModel); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/INetWork.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3569577a07076ac44a06df8bbe6d7bf2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/NetConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | /// 6 | /// 所有网络模块初始参数父类 7 | /// 8 | public class NetConfig 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/NetConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bb2a0f841143b44abd7321937beb2c9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/NetHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | /// 6 | /// 所有关于事件方式计入 7 | /// 8 | public class NetHandler 9 | { 10 | /// 11 | /// 定义消息回调 12 | /// 13 | /// 14 | public delegate void NetCoreCallBack(NetCoreBackData netCoreBackData); 15 | } 16 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/NetHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 467c7ea4e68abc6428b68ca4fc8614a0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/NetSendModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | /// 6 | /// 所有关于消息发送基类 7 | /// 8 | public class NetSendModel 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Assets/script/lib/net/util/interfaces/NetSendModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb44fa728dcd0a04ca81056d83cc7478 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/Logs/Packages-Update.log: -------------------------------------------------------------------------------- 1 | 2 | === Thu Nov 26 20:42:06 2020 3 | 4 | Packages were changed. 5 | Update Mode: mergeDefaultDependencies 6 | 7 | The following packages were added: 8 | com.unity.analytics@3.2.2 9 | com.unity.purchasing@2.0.3 10 | com.unity.ads@2.0.8 11 | com.unity.textmeshpro@1.4.1 12 | com.unity.package-manager-ui@2.0.7 13 | com.unity.collab-proxy@1.2.15 14 | com.unity.modules.ai@1.0.0 15 | com.unity.modules.animation@1.0.0 16 | com.unity.modules.assetbundle@1.0.0 17 | com.unity.modules.audio@1.0.0 18 | com.unity.modules.cloth@1.0.0 19 | com.unity.modules.director@1.0.0 20 | com.unity.modules.imageconversion@1.0.0 21 | com.unity.modules.imgui@1.0.0 22 | com.unity.modules.jsonserialize@1.0.0 23 | com.unity.modules.particlesystem@1.0.0 24 | com.unity.modules.physics@1.0.0 25 | com.unity.modules.physics2d@1.0.0 26 | com.unity.modules.screencapture@1.0.0 27 | com.unity.modules.terrain@1.0.0 28 | com.unity.modules.terrainphysics@1.0.0 29 | com.unity.modules.tilemap@1.0.0 30 | com.unity.modules.ui@1.0.0 31 | com.unity.modules.uielements@1.0.0 32 | com.unity.modules.umbra@1.0.0 33 | com.unity.modules.unityanalytics@1.0.0 34 | com.unity.modules.unitywebrequest@1.0.0 35 | com.unity.modules.unitywebrequestassetbundle@1.0.0 36 | com.unity.modules.unitywebrequestaudio@1.0.0 37 | com.unity.modules.unitywebrequesttexture@1.0.0 38 | com.unity.modules.unitywebrequestwww@1.0.0 39 | com.unity.modules.vehicles@1.0.0 40 | com.unity.modules.video@1.0.0 41 | com.unity.modules.vr@1.0.0 42 | com.unity.modules.wind@1.0.0 43 | com.unity.modules.xr@1.0.0 44 | -------------------------------------------------------------------------------- /unitylib/gamelib/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.0.8", 4 | "com.unity.analytics": "3.2.2", 5 | "com.unity.collab-proxy": "1.2.15", 6 | "com.unity.package-manager-ui": "2.0.7", 7 | "com.unity.purchasing": "2.0.3", 8 | "com.unity.textmeshpro": "1.4.1", 9 | "com.unity.modules.ai": "1.0.0", 10 | "com.unity.modules.animation": "1.0.0", 11 | "com.unity.modules.assetbundle": "1.0.0", 12 | "com.unity.modules.audio": "1.0.0", 13 | "com.unity.modules.cloth": "1.0.0", 14 | "com.unity.modules.director": "1.0.0", 15 | "com.unity.modules.imageconversion": "1.0.0", 16 | "com.unity.modules.imgui": "1.0.0", 17 | "com.unity.modules.jsonserialize": "1.0.0", 18 | "com.unity.modules.particlesystem": "1.0.0", 19 | "com.unity.modules.physics": "1.0.0", 20 | "com.unity.modules.physics2d": "1.0.0", 21 | "com.unity.modules.screencapture": "1.0.0", 22 | "com.unity.modules.terrain": "1.0.0", 23 | "com.unity.modules.terrainphysics": "1.0.0", 24 | "com.unity.modules.tilemap": "1.0.0", 25 | "com.unity.modules.ui": "1.0.0", 26 | "com.unity.modules.uielements": "1.0.0", 27 | "com.unity.modules.umbra": "1.0.0", 28 | "com.unity.modules.unityanalytics": "1.0.0", 29 | "com.unity.modules.unitywebrequest": "1.0.0", 30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 31 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 32 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 33 | "com.unity.modules.unitywebrequestwww": "1.0.0", 34 | "com.unity.modules.vehicles": "1.0.0", 35 | "com.unity.modules.video": "1.0.0", 36 | "com.unity.modules.vr": "1.0.0", 37 | "com.unity.modules.wind": "1.0.0", 38 | "com.unity.modules.xr": "1.0.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 8 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_ReuseCollisionCallbacks: 1 28 | m_AutoSyncTransforms: 0 29 | m_AlwaysShowColliders: 0 30 | m_ShowColliderSleep: 1 31 | m_ShowColliderContacts: 0 32 | m_ShowColliderAABB: 0 33 | m_ContactArrowScale: 0.2 34 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 35 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 36 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 37 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 38 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 39 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | productGUID: b936bae8cc397ea4aa37cef735bfaeae 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: gamelib 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 0 68 | androidBlitType: 0 69 | defaultIsNativeResolution: 1 70 | macRetinaSupport: 1 71 | runInBackground: 1 72 | captureSingleScreen: 0 73 | muteOtherAudioSources: 0 74 | Prepare IOS For Recording: 0 75 | Force IOS Speakers When Recording: 0 76 | deferSystemGesturesMode: 0 77 | hideHomeButton: 0 78 | submitAnalytics: 1 79 | usePlayerLog: 1 80 | bakeCollisionMeshes: 0 81 | forceSingleInstance: 0 82 | resizableWindow: 0 83 | useMacAppStoreValidation: 0 84 | macAppStoreCategory: public.app-category.games 85 | gpuSkinning: 1 86 | graphicsJobs: 0 87 | xboxPIXTextureCapture: 0 88 | xboxEnableAvatar: 0 89 | xboxEnableKinect: 0 90 | xboxEnableKinectAutoTracking: 0 91 | xboxEnableFitness: 0 92 | visibleInBackground: 1 93 | allowFullscreenSwitch: 1 94 | graphicsJobMode: 0 95 | fullscreenMode: 1 96 | xboxSpeechDB: 0 97 | xboxEnableHeadOrientation: 0 98 | xboxEnableGuest: 0 99 | xboxEnablePIXSampling: 0 100 | metalFramebufferOnly: 0 101 | xboxOneResolution: 0 102 | xboxOneSResolution: 0 103 | xboxOneXResolution: 3 104 | xboxOneMonoLoggingLevel: 0 105 | xboxOneLoggingLevel: 1 106 | xboxOneDisableEsram: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | switchQueueCommandMemory: 0 109 | switchQueueControlMemory: 16384 110 | switchQueueComputeMemory: 262144 111 | switchNVNShaderPoolsGranularity: 33554432 112 | switchNVNDefaultPoolsGranularity: 16777216 113 | switchNVNOtherPoolsGranularity: 16777216 114 | vulkanEnableSetSRGBWrite: 0 115 | m_SupportedAspectRatios: 116 | 4:3: 1 117 | 5:4: 1 118 | 16:10: 1 119 | 16:9: 1 120 | Others: 1 121 | bundleVersion: 0.1 122 | preloadedAssets: [] 123 | metroInputSource: 0 124 | wsaTransparentSwapchain: 0 125 | m_HolographicPauseOnTrackingLoss: 1 126 | xboxOneDisableKinectGpuReservation: 1 127 | xboxOneEnable7thCore: 1 128 | isWsaHolographicRemotingEnabled: 0 129 | vrSettings: 130 | cardboard: 131 | depthFormat: 0 132 | enableTransitionView: 0 133 | daydream: 134 | depthFormat: 0 135 | useSustainedPerformanceMode: 0 136 | enableVideoLayer: 0 137 | useProtectedVideoMemory: 0 138 | minimumSupportedHeadTracking: 0 139 | maximumSupportedHeadTracking: 1 140 | hololens: 141 | depthFormat: 1 142 | depthBufferSharingEnabled: 1 143 | oculus: 144 | sharedDepthBuffer: 1 145 | dashSupport: 1 146 | enable360StereoCapture: 0 147 | protectGraphicsMemory: 0 148 | enableFrameTimingStats: 0 149 | useHDRDisplay: 0 150 | m_ColorGamuts: 00000000 151 | targetPixelDensity: 30 152 | resolutionScalingMode: 0 153 | androidSupportedAspectRatio: 1 154 | androidMaxAspectRatio: 2.1 155 | applicationIdentifier: {} 156 | buildNumber: {} 157 | AndroidBundleVersionCode: 1 158 | AndroidMinSdkVersion: 16 159 | AndroidTargetSdkVersion: 0 160 | AndroidPreferredInstallLocation: 1 161 | aotOptions: 162 | stripEngineCode: 1 163 | iPhoneStrippingLevel: 0 164 | iPhoneScriptCallOptimization: 0 165 | ForceInternetPermission: 0 166 | ForceSDCardPermission: 0 167 | CreateWallpaper: 0 168 | APKExpansionFiles: 0 169 | keepLoadedShadersAlive: 0 170 | StripUnusedMeshComponents: 1 171 | VertexChannelCompressionMask: 4054 172 | iPhoneSdkVersion: 988 173 | iOSTargetOSVersionString: 9.0 174 | tvOSSdkVersion: 0 175 | tvOSRequireExtendedGameController: 0 176 | tvOSTargetOSVersionString: 9.0 177 | uIPrerenderedIcon: 0 178 | uIRequiresPersistentWiFi: 0 179 | uIRequiresFullScreen: 1 180 | uIStatusBarHidden: 1 181 | uIExitOnSuspend: 0 182 | uIStatusBarStyle: 0 183 | iPhoneSplashScreen: {fileID: 0} 184 | iPhoneHighResSplashScreen: {fileID: 0} 185 | iPhoneTallHighResSplashScreen: {fileID: 0} 186 | iPhone47inSplashScreen: {fileID: 0} 187 | iPhone55inPortraitSplashScreen: {fileID: 0} 188 | iPhone55inLandscapeSplashScreen: {fileID: 0} 189 | iPhone58inPortraitSplashScreen: {fileID: 0} 190 | iPhone58inLandscapeSplashScreen: {fileID: 0} 191 | iPadPortraitSplashScreen: {fileID: 0} 192 | iPadHighResPortraitSplashScreen: {fileID: 0} 193 | iPadLandscapeSplashScreen: {fileID: 0} 194 | iPadHighResLandscapeSplashScreen: {fileID: 0} 195 | appleTVSplashScreen: {fileID: 0} 196 | appleTVSplashScreen2x: {fileID: 0} 197 | tvOSSmallIconLayers: [] 198 | tvOSSmallIconLayers2x: [] 199 | tvOSLargeIconLayers: [] 200 | tvOSLargeIconLayers2x: [] 201 | tvOSTopShelfImageLayers: [] 202 | tvOSTopShelfImageLayers2x: [] 203 | tvOSTopShelfImageWideLayers: [] 204 | tvOSTopShelfImageWideLayers2x: [] 205 | iOSLaunchScreenType: 0 206 | iOSLaunchScreenPortrait: {fileID: 0} 207 | iOSLaunchScreenLandscape: {fileID: 0} 208 | iOSLaunchScreenBackgroundColor: 209 | serializedVersion: 2 210 | rgba: 0 211 | iOSLaunchScreenFillPct: 100 212 | iOSLaunchScreenSize: 100 213 | iOSLaunchScreenCustomXibPath: 214 | iOSLaunchScreeniPadType: 0 215 | iOSLaunchScreeniPadImage: {fileID: 0} 216 | iOSLaunchScreeniPadBackgroundColor: 217 | serializedVersion: 2 218 | rgba: 0 219 | iOSLaunchScreeniPadFillPct: 100 220 | iOSLaunchScreeniPadSize: 100 221 | iOSLaunchScreeniPadCustomXibPath: 222 | iOSUseLaunchScreenStoryboard: 0 223 | iOSLaunchScreenCustomStoryboardPath: 224 | iOSDeviceRequirements: [] 225 | iOSURLSchemes: [] 226 | iOSBackgroundModes: 0 227 | iOSMetalForceHardShadows: 0 228 | metalEditorSupport: 1 229 | metalAPIValidation: 1 230 | iOSRenderExtraFrameOnPause: 0 231 | appleDeveloperTeamID: 232 | iOSManualSigningProvisioningProfileID: 233 | tvOSManualSigningProvisioningProfileID: 234 | iOSManualSigningProvisioningProfileType: 0 235 | tvOSManualSigningProvisioningProfileType: 0 236 | appleEnableAutomaticSigning: 0 237 | iOSRequireARKit: 0 238 | iOSAutomaticallyDetectAndAddCapabilities: 1 239 | appleEnableProMotion: 0 240 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 241 | templatePackageId: com.unity.template.3d@1.3.0 242 | templateDefaultScene: Assets/Scenes/SampleScene.unity 243 | AndroidTargetArchitectures: 5 244 | AndroidSplashScreenScale: 0 245 | androidSplashScreen: {fileID: 0} 246 | AndroidKeystoreName: 247 | AndroidKeyaliasName: 248 | AndroidBuildApkPerCpuArchitecture: 0 249 | AndroidTVCompatibility: 1 250 | AndroidIsGame: 1 251 | AndroidEnableTango: 0 252 | androidEnableBanner: 1 253 | androidUseLowAccuracyLocation: 0 254 | m_AndroidBanners: 255 | - width: 320 256 | height: 180 257 | banner: {fileID: 0} 258 | androidGamepadSupportLevel: 0 259 | resolutionDialogBanner: {fileID: 0} 260 | m_BuildTargetIcons: [] 261 | m_BuildTargetPlatformIcons: [] 262 | m_BuildTargetBatching: 263 | - m_BuildTarget: Standalone 264 | m_StaticBatching: 1 265 | m_DynamicBatching: 0 266 | - m_BuildTarget: tvOS 267 | m_StaticBatching: 1 268 | m_DynamicBatching: 0 269 | - m_BuildTarget: Android 270 | m_StaticBatching: 1 271 | m_DynamicBatching: 0 272 | - m_BuildTarget: iPhone 273 | m_StaticBatching: 1 274 | m_DynamicBatching: 0 275 | - m_BuildTarget: WebGL 276 | m_StaticBatching: 0 277 | m_DynamicBatching: 0 278 | m_BuildTargetGraphicsAPIs: 279 | - m_BuildTarget: AndroidPlayer 280 | m_APIs: 0b00000008000000 281 | m_Automatic: 1 282 | - m_BuildTarget: iOSSupport 283 | m_APIs: 10000000 284 | m_Automatic: 1 285 | - m_BuildTarget: AppleTVSupport 286 | m_APIs: 10000000 287 | m_Automatic: 0 288 | - m_BuildTarget: WebGLSupport 289 | m_APIs: 0b000000 290 | m_Automatic: 1 291 | m_BuildTargetVRSettings: 292 | - m_BuildTarget: Standalone 293 | m_Enabled: 0 294 | m_Devices: 295 | - Oculus 296 | - OpenVR 297 | m_BuildTargetEnableVuforiaSettings: [] 298 | openGLRequireES31: 0 299 | openGLRequireES31AEP: 0 300 | m_TemplateCustomTags: {} 301 | mobileMTRendering: 302 | Android: 1 303 | iPhone: 1 304 | tvOS: 1 305 | m_BuildTargetGroupLightmapEncodingQuality: [] 306 | m_BuildTargetGroupLightmapSettings: [] 307 | playModeTestRunnerEnabled: 0 308 | runPlayModeTestAsEditModeTest: 0 309 | actionOnDotNetUnhandledException: 1 310 | enableInternalProfiler: 0 311 | logObjCUncaughtExceptions: 1 312 | enableCrashReportAPI: 0 313 | cameraUsageDescription: 314 | locationUsageDescription: 315 | microphoneUsageDescription: 316 | switchNetLibKey: 317 | switchSocketMemoryPoolSize: 6144 318 | switchSocketAllocatorPoolSize: 128 319 | switchSocketConcurrencyLimit: 14 320 | switchScreenResolutionBehavior: 2 321 | switchUseCPUProfiler: 0 322 | switchApplicationID: 0x01004b9000490000 323 | switchNSODependencies: 324 | switchTitleNames_0: 325 | switchTitleNames_1: 326 | switchTitleNames_2: 327 | switchTitleNames_3: 328 | switchTitleNames_4: 329 | switchTitleNames_5: 330 | switchTitleNames_6: 331 | switchTitleNames_7: 332 | switchTitleNames_8: 333 | switchTitleNames_9: 334 | switchTitleNames_10: 335 | switchTitleNames_11: 336 | switchTitleNames_12: 337 | switchTitleNames_13: 338 | switchTitleNames_14: 339 | switchPublisherNames_0: 340 | switchPublisherNames_1: 341 | switchPublisherNames_2: 342 | switchPublisherNames_3: 343 | switchPublisherNames_4: 344 | switchPublisherNames_5: 345 | switchPublisherNames_6: 346 | switchPublisherNames_7: 347 | switchPublisherNames_8: 348 | switchPublisherNames_9: 349 | switchPublisherNames_10: 350 | switchPublisherNames_11: 351 | switchPublisherNames_12: 352 | switchPublisherNames_13: 353 | switchPublisherNames_14: 354 | switchIcons_0: {fileID: 0} 355 | switchIcons_1: {fileID: 0} 356 | switchIcons_2: {fileID: 0} 357 | switchIcons_3: {fileID: 0} 358 | switchIcons_4: {fileID: 0} 359 | switchIcons_5: {fileID: 0} 360 | switchIcons_6: {fileID: 0} 361 | switchIcons_7: {fileID: 0} 362 | switchIcons_8: {fileID: 0} 363 | switchIcons_9: {fileID: 0} 364 | switchIcons_10: {fileID: 0} 365 | switchIcons_11: {fileID: 0} 366 | switchIcons_12: {fileID: 0} 367 | switchIcons_13: {fileID: 0} 368 | switchIcons_14: {fileID: 0} 369 | switchSmallIcons_0: {fileID: 0} 370 | switchSmallIcons_1: {fileID: 0} 371 | switchSmallIcons_2: {fileID: 0} 372 | switchSmallIcons_3: {fileID: 0} 373 | switchSmallIcons_4: {fileID: 0} 374 | switchSmallIcons_5: {fileID: 0} 375 | switchSmallIcons_6: {fileID: 0} 376 | switchSmallIcons_7: {fileID: 0} 377 | switchSmallIcons_8: {fileID: 0} 378 | switchSmallIcons_9: {fileID: 0} 379 | switchSmallIcons_10: {fileID: 0} 380 | switchSmallIcons_11: {fileID: 0} 381 | switchSmallIcons_12: {fileID: 0} 382 | switchSmallIcons_13: {fileID: 0} 383 | switchSmallIcons_14: {fileID: 0} 384 | switchManualHTML: 385 | switchAccessibleURLs: 386 | switchLegalInformation: 387 | switchMainThreadStackSize: 1048576 388 | switchPresenceGroupId: 389 | switchLogoHandling: 0 390 | switchReleaseVersion: 0 391 | switchDisplayVersion: 1.0.0 392 | switchStartupUserAccount: 0 393 | switchTouchScreenUsage: 0 394 | switchSupportedLanguagesMask: 0 395 | switchLogoType: 0 396 | switchApplicationErrorCodeCategory: 397 | switchUserAccountSaveDataSize: 0 398 | switchUserAccountSaveDataJournalSize: 0 399 | switchApplicationAttribute: 0 400 | switchCardSpecSize: -1 401 | switchCardSpecClock: -1 402 | switchRatingsMask: 0 403 | switchRatingsInt_0: 0 404 | switchRatingsInt_1: 0 405 | switchRatingsInt_2: 0 406 | switchRatingsInt_3: 0 407 | switchRatingsInt_4: 0 408 | switchRatingsInt_5: 0 409 | switchRatingsInt_6: 0 410 | switchRatingsInt_7: 0 411 | switchRatingsInt_8: 0 412 | switchRatingsInt_9: 0 413 | switchRatingsInt_10: 0 414 | switchRatingsInt_11: 0 415 | switchLocalCommunicationIds_0: 416 | switchLocalCommunicationIds_1: 417 | switchLocalCommunicationIds_2: 418 | switchLocalCommunicationIds_3: 419 | switchLocalCommunicationIds_4: 420 | switchLocalCommunicationIds_5: 421 | switchLocalCommunicationIds_6: 422 | switchLocalCommunicationIds_7: 423 | switchParentalControl: 0 424 | switchAllowsScreenshot: 1 425 | switchAllowsVideoCapturing: 1 426 | switchAllowsRuntimeAddOnContentInstall: 0 427 | switchDataLossConfirmation: 0 428 | switchUserAccountLockEnabled: 0 429 | switchSystemResourceMemory: 16777216 430 | switchSupportedNpadStyles: 3 431 | switchNativeFsCacheSize: 32 432 | switchIsHoldTypeHorizontal: 0 433 | switchSupportedNpadCount: 8 434 | switchSocketConfigEnabled: 0 435 | switchTcpInitialSendBufferSize: 32 436 | switchTcpInitialReceiveBufferSize: 64 437 | switchTcpAutoSendBufferSizeMax: 256 438 | switchTcpAutoReceiveBufferSizeMax: 256 439 | switchUdpSendBufferSize: 9 440 | switchUdpReceiveBufferSize: 42 441 | switchSocketBufferEfficiency: 4 442 | switchSocketInitializeEnabled: 1 443 | switchNetworkInterfaceManagerInitializeEnabled: 1 444 | switchPlayerConnectionEnabled: 1 445 | ps4NPAgeRating: 12 446 | ps4NPTitleSecret: 447 | ps4NPTrophyPackPath: 448 | ps4ParentalLevel: 11 449 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 450 | ps4Category: 0 451 | ps4MasterVersion: 01.00 452 | ps4AppVersion: 01.00 453 | ps4AppType: 0 454 | ps4ParamSfxPath: 455 | ps4VideoOutPixelFormat: 0 456 | ps4VideoOutInitialWidth: 1920 457 | ps4VideoOutBaseModeInitialWidth: 1920 458 | ps4VideoOutReprojectionRate: 60 459 | ps4PronunciationXMLPath: 460 | ps4PronunciationSIGPath: 461 | ps4BackgroundImagePath: 462 | ps4StartupImagePath: 463 | ps4StartupImagesFolder: 464 | ps4IconImagesFolder: 465 | ps4SaveDataImagePath: 466 | ps4SdkOverride: 467 | ps4BGMPath: 468 | ps4ShareFilePath: 469 | ps4ShareOverlayImagePath: 470 | ps4PrivacyGuardImagePath: 471 | ps4NPtitleDatPath: 472 | ps4RemotePlayKeyAssignment: -1 473 | ps4RemotePlayKeyMappingDir: 474 | ps4PlayTogetherPlayerCount: 0 475 | ps4EnterButtonAssignment: 1 476 | ps4ApplicationParam1: 0 477 | ps4ApplicationParam2: 0 478 | ps4ApplicationParam3: 0 479 | ps4ApplicationParam4: 0 480 | ps4DownloadDataSize: 0 481 | ps4GarlicHeapSize: 2048 482 | ps4ProGarlicHeapSize: 2560 483 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 484 | ps4pnSessions: 1 485 | ps4pnPresence: 1 486 | ps4pnFriends: 1 487 | ps4pnGameCustomData: 1 488 | playerPrefsSupport: 0 489 | enableApplicationExit: 0 490 | resetTempFolder: 1 491 | restrictedAudioUsageRights: 0 492 | ps4UseResolutionFallback: 0 493 | ps4ReprojectionSupport: 0 494 | ps4UseAudio3dBackend: 0 495 | ps4SocialScreenEnabled: 0 496 | ps4ScriptOptimizationLevel: 0 497 | ps4Audio3dVirtualSpeakerCount: 14 498 | ps4attribCpuUsage: 0 499 | ps4PatchPkgPath: 500 | ps4PatchLatestPkgPath: 501 | ps4PatchChangeinfoPath: 502 | ps4PatchDayOne: 0 503 | ps4attribUserManagement: 0 504 | ps4attribMoveSupport: 0 505 | ps4attrib3DSupport: 0 506 | ps4attribShareSupport: 0 507 | ps4attribExclusiveVR: 0 508 | ps4disableAutoHideSplash: 0 509 | ps4videoRecordingFeaturesUsed: 0 510 | ps4contentSearchFeaturesUsed: 0 511 | ps4attribEyeToEyeDistanceSettingVR: 0 512 | ps4IncludedModules: [] 513 | monoEnv: 514 | splashScreenBackgroundSourceLandscape: {fileID: 0} 515 | splashScreenBackgroundSourcePortrait: {fileID: 0} 516 | spritePackerPolicy: 517 | webGLMemorySize: 256 518 | webGLExceptionSupport: 1 519 | webGLNameFilesAsHashes: 0 520 | webGLDataCaching: 1 521 | webGLDebugSymbols: 0 522 | webGLEmscriptenArgs: 523 | webGLModulesDirectory: 524 | webGLTemplate: APPLICATION:Default 525 | webGLAnalyzeBuildSize: 0 526 | webGLUseEmbeddedResources: 0 527 | webGLCompressionFormat: 1 528 | webGLLinkerTarget: 1 529 | webGLThreadsSupport: 0 530 | scriptingDefineSymbols: {} 531 | platformArchitecture: {} 532 | scriptingBackend: {} 533 | il2cppCompilerConfiguration: {} 534 | managedStrippingLevel: {} 535 | incrementalIl2cppBuild: {} 536 | allowUnsafeCode: 0 537 | additionalIl2CppArgs: 538 | scriptingRuntimeVersion: 1 539 | apiCompatibilityLevelPerPlatform: {} 540 | m_RenderingPath: 1 541 | m_MobileRenderingPath: 1 542 | metroPackageName: Template_3D 543 | metroPackageVersion: 544 | metroCertificatePath: 545 | metroCertificatePassword: 546 | metroCertificateSubject: 547 | metroCertificateIssuer: 548 | metroCertificateNotAfter: 0000000000000000 549 | metroApplicationDescription: Template_3D 550 | wsaImages: {} 551 | metroTileShortName: 552 | metroTileShowName: 0 553 | metroMediumTileShowName: 0 554 | metroLargeTileShowName: 0 555 | metroWideTileShowName: 0 556 | metroSupportStreamingInstall: 0 557 | metroLastRequiredScene: 0 558 | metroDefaultTileSize: 1 559 | metroTileForegroundText: 2 560 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 561 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 562 | a: 1} 563 | metroSplashScreenUseBackgroundColor: 0 564 | platformCapabilities: {} 565 | metroTargetDeviceFamilies: {} 566 | metroFTAName: 567 | metroFTAFileTypes: [] 568 | metroProtocolName: 569 | metroCompilationOverrides: 1 570 | XboxOneProductId: 571 | XboxOneUpdateKey: 572 | XboxOneSandboxId: 573 | XboxOneContentId: 574 | XboxOneTitleId: 575 | XboxOneSCId: 576 | XboxOneGameOsOverridePath: 577 | XboxOnePackagingOverridePath: 578 | XboxOneAppManifestOverridePath: 579 | XboxOneVersion: 1.0.0.0 580 | XboxOnePackageEncryption: 0 581 | XboxOnePackageUpdateGranularity: 2 582 | XboxOneDescription: 583 | XboxOneLanguage: 584 | - enus 585 | XboxOneCapability: [] 586 | XboxOneGameRating: {} 587 | XboxOneIsContentPackage: 0 588 | XboxOneEnableGPUVariability: 1 589 | XboxOneSockets: {} 590 | XboxOneSplashScreen: {fileID: 0} 591 | XboxOneAllowedProductIds: [] 592 | XboxOnePersistentLocalStorageSize: 0 593 | XboxOneXTitleMemory: 8 594 | xboxOneScriptCompiler: 1 595 | XboxOneOverrideIdentityName: 596 | vrEditorSettings: 597 | daydream: 598 | daydreamIconForeground: {fileID: 0} 599 | daydreamIconBackground: {fileID: 0} 600 | cloudServicesEnabled: 601 | UNet: 1 602 | luminIcon: 603 | m_Name: 604 | m_ModelFolderPath: 605 | m_PortalFolderPath: 606 | luminCert: 607 | m_CertPath: 608 | m_PrivateKeyPath: 609 | luminIsChannelApp: 0 610 | luminVersion: 611 | m_VersionCode: 1 612 | m_VersionName: 613 | facebookSdkVersion: 7.9.4 614 | facebookAppId: 615 | facebookCookies: 1 616 | facebookLogging: 1 617 | facebookStatus: 1 618 | facebookXfbml: 0 619 | facebookFrictionlessRequests: 1 620 | apiCompatibilityLevel: 6 621 | cloudProjectId: ef2c24e1-0e70-4ebb-aff4-55a903449f40 622 | framebufferDepthMemorylessMode: 0 623 | projectName: gamelib 624 | organizationId: organization-2157470 625 | cloudEnabled: 0 626 | enableNativePlatformBackendsForNewInputSystem: 0 627 | disableOldInputManagerSupport: 0 628 | legacyClampBlendShapeWeights: 0 629 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.4.3f1 2 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 16 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 16 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 16 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 2 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 16 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 40 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 1 136 | antiAliasing: 4 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 16 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 16 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSP2: 2 183 | Standalone: 5 184 | Tizen: 2 185 | WebGL: 3 186 | WiiU: 5 187 | Windows Store Apps: 5 188 | XboxOne: 5 189 | iPhone: 2 190 | tvOS: 2 191 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - PostProcessing 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 1 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /unitylib/gamelib/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /unitylib/gamelib/gamelib.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{EBC8EE02-9E80-4D9A-3788-DE915C409FAB}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {EBC8EE02-9E80-4D9A-3788-DE915C409FAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {EBC8EE02-9E80-4D9A-3788-DE915C409FAB}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {EBC8EE02-9E80-4D9A-3788-DE915C409FAB}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {EBC8EE02-9E80-4D9A-3788-DE915C409FAB}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /unitylib/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlyTouch/unitygamelib/5c9e70b8e9e007c86c7ed8700a2ce85af730259d/unitylib/readme.txt --------------------------------------------------------------------------------