├── .gitignore ├── Assets ├── Game.meta ├── Game │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── GameController.prefab │ │ ├── GameController.prefab.meta │ │ ├── UICanvas.prefab │ │ └── UICanvas.prefab.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── GameController.cs │ │ ├── GameController.cs.meta │ │ ├── PlayerManager.cs │ │ ├── PlayerManager.cs.meta │ │ ├── ProtocolType.cs │ │ └── ProtocolType.cs.meta │ ├── Textures.meta │ ├── _Scenes.meta │ └── _Scenes │ │ ├── MinimalOnlineGame.unity │ │ └── MinimalOnlineGame.unity.meta ├── Proton.meta ├── Proton │ ├── Networking.meta │ └── Networking │ │ ├── Resources.meta │ │ ├── Resources │ │ ├── NetworkConfig.asset │ │ └── NetworkConfig.asset.meta │ │ ├── Scripts.meta │ │ └── Scripts │ │ ├── Connection.cs │ │ ├── Connection.cs.meta │ │ ├── MessageDistributor.cs │ │ ├── MessageDistributor.cs.meta │ │ ├── NetworkConfig.cs │ │ ├── NetworkConfig.cs.meta │ │ ├── NetworkManager.cs │ │ ├── NetworkManager.cs.meta │ │ ├── NetworkStatus.cs │ │ ├── NetworkStatus.cs.meta │ │ ├── Protocol.cs │ │ ├── Protocol.cs.meta │ │ ├── ProtocolBytes.cs │ │ ├── ProtocolBytes.cs.meta │ │ ├── ProtocolStr.cs │ │ └── ProtocolStr.cs.meta ├── UI.meta └── UI │ ├── Resources.meta │ ├── Resources │ ├── AlertPanel.prefab │ ├── AlertPanel.prefab.meta │ ├── LobbyPanel.prefab │ ├── LobbyPanel.prefab.meta │ ├── LoginPanel.prefab │ ├── LoginPanel.prefab.meta │ ├── RegisterPanel.prefab │ ├── RegisterPanel.prefab.meta │ ├── RoomPanel.prefab │ └── RoomPanel.prefab.meta │ ├── Scripts.meta │ ├── Scripts │ ├── AlertPanel.cs │ ├── AlertPanel.cs.meta │ ├── LobbyPanel.cs │ ├── LobbyPanel.cs.meta │ ├── LoginPanel.cs │ ├── LoginPanel.cs.meta │ ├── PanelLayerEnum.cs │ ├── PanelLayerEnum.cs.meta │ ├── RegisterPanel.cs │ ├── RegisterPanel.cs.meta │ ├── RoomPanel.cs │ ├── RoomPanel.cs.meta │ ├── UIManager.cs │ ├── UIManager.cs.meta │ ├── UIPanel.cs │ └── UIPanel.cs.meta │ ├── Textures.meta │ └── Textures │ ├── background.jpg │ ├── background.jpg.meta │ ├── closeBtn.png │ ├── closeBtn.png.meta │ ├── closeBtn2.png │ ├── closeBtn2.png.meta │ ├── window-background.png │ └── window-background.png.meta ├── Docs └── Proton Engine Manual.md ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md └── UnityPackageManager └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | 30 | # Unity3D Generated File On Crash Reports 31 | sysinfo.txt 32 | 33 | # Builds 34 | *.apk 35 | *.unitypackage 36 | 37 | # Rider 38 | .idea/ 39 | Assets/Plugins/Editor/JetBrains.meta 40 | Assets/Plugins/Editor/JetBrains/ 41 | -------------------------------------------------------------------------------- /Assets/Game.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 745f656b77720d84eaf2d463b11a5d67 3 | folderAsset: yes 4 | timeCreated: 1510652864 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Game/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c71b104a06e256d4c9e18f7dbb03acf7 3 | folderAsset: yes 4 | timeCreated: 1510653151 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Game/Prefabs/GameController.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1081814624420670} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1081814624420670 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4770627652198908} 22 | - component: {fileID: 114608720260756652} 23 | - component: {fileID: 114727898344944746} 24 | m_Layer: 0 25 | m_Name: GameController 26 | m_TagString: GameController 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4770627652198908 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1081814624420670} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!114 &114608720260756652 45 | MonoBehaviour: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1081814624420670} 50 | m_Enabled: 1 51 | m_EditorHideFlags: 0 52 | m_Script: {fileID: 11500000, guid: 96ccbe45076662449a8b63dbd4a8d927, type: 3} 53 | m_Name: 54 | m_EditorClassIdentifier: 55 | --- !u!114 &114727898344944746 56 | MonoBehaviour: 57 | m_ObjectHideFlags: 1 58 | m_PrefabParentObject: {fileID: 0} 59 | m_PrefabInternal: {fileID: 100100000} 60 | m_GameObject: {fileID: 1081814624420670} 61 | m_Enabled: 1 62 | m_EditorHideFlags: 0 63 | m_Script: {fileID: 11500000, guid: eff7ae3a49091af4da350e914097d1e9, type: 3} 64 | m_Name: 65 | m_EditorClassIdentifier: 66 | -------------------------------------------------------------------------------- /Assets/Game/Prefabs/GameController.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 319364fbf51857e4792bf3e6a80d68be 3 | timeCreated: 1511159092 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Game/Prefabs/UICanvas.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1847978998306174} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1509142172789454 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 224346695023079036} 22 | m_Layer: 5 23 | m_Name: Panel 24 | m_TagString: Untagged 25 | m_Icon: {fileID: 0} 26 | m_NavMeshLayer: 0 27 | m_StaticEditorFlags: 0 28 | m_IsActive: 1 29 | --- !u!1 &1680193704231160 30 | GameObject: 31 | m_ObjectHideFlags: 0 32 | m_PrefabParentObject: {fileID: 0} 33 | m_PrefabInternal: {fileID: 100100000} 34 | serializedVersion: 5 35 | m_Component: 36 | - component: {fileID: 224063892299672026} 37 | m_Layer: 5 38 | m_Name: Alert 39 | m_TagString: Untagged 40 | m_Icon: {fileID: 0} 41 | m_NavMeshLayer: 0 42 | m_StaticEditorFlags: 0 43 | m_IsActive: 1 44 | --- !u!1 &1847978998306174 45 | GameObject: 46 | m_ObjectHideFlags: 0 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | serializedVersion: 5 50 | m_Component: 51 | - component: {fileID: 224445155007366344} 52 | - component: {fileID: 223044547403222866} 53 | - component: {fileID: 114397122926973076} 54 | - component: {fileID: 114486125463352168} 55 | m_Layer: 5 56 | m_Name: UICanvas 57 | m_TagString: Untagged 58 | m_Icon: {fileID: 0} 59 | m_NavMeshLayer: 0 60 | m_StaticEditorFlags: 0 61 | m_IsActive: 1 62 | --- !u!114 &114397122926973076 63 | MonoBehaviour: 64 | m_ObjectHideFlags: 1 65 | m_PrefabParentObject: {fileID: 0} 66 | m_PrefabInternal: {fileID: 100100000} 67 | m_GameObject: {fileID: 1847978998306174} 68 | m_Enabled: 1 69 | m_EditorHideFlags: 0 70 | m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} 71 | m_Name: 72 | m_EditorClassIdentifier: 73 | m_UiScaleMode: 0 74 | m_ReferencePixelsPerUnit: 100 75 | m_ScaleFactor: 1 76 | m_ReferenceResolution: {x: 800, y: 600} 77 | m_ScreenMatchMode: 0 78 | m_MatchWidthOrHeight: 0 79 | m_PhysicalUnit: 3 80 | m_FallbackScreenDPI: 96 81 | m_DefaultSpriteDPI: 96 82 | m_DynamicPixelsPerUnit: 1 83 | --- !u!114 &114486125463352168 84 | MonoBehaviour: 85 | m_ObjectHideFlags: 1 86 | m_PrefabParentObject: {fileID: 0} 87 | m_PrefabInternal: {fileID: 100100000} 88 | m_GameObject: {fileID: 1847978998306174} 89 | m_Enabled: 1 90 | m_EditorHideFlags: 0 91 | m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} 92 | m_Name: 93 | m_EditorClassIdentifier: 94 | m_IgnoreReversedGraphics: 1 95 | m_BlockingObjects: 0 96 | m_BlockingMask: 97 | serializedVersion: 2 98 | m_Bits: 4294967295 99 | --- !u!223 &223044547403222866 100 | Canvas: 101 | m_ObjectHideFlags: 1 102 | m_PrefabParentObject: {fileID: 0} 103 | m_PrefabInternal: {fileID: 100100000} 104 | m_GameObject: {fileID: 1847978998306174} 105 | m_Enabled: 1 106 | serializedVersion: 3 107 | m_RenderMode: 0 108 | m_Camera: {fileID: 0} 109 | m_PlaneDistance: 100 110 | m_PixelPerfect: 0 111 | m_ReceivesEvents: 1 112 | m_OverrideSorting: 0 113 | m_OverridePixelPerfect: 0 114 | m_SortingBucketNormalizedSize: 0 115 | m_AdditionalShaderChannelsFlag: 0 116 | m_SortingLayerID: 0 117 | m_SortingOrder: 0 118 | m_TargetDisplay: 0 119 | --- !u!224 &224063892299672026 120 | RectTransform: 121 | m_ObjectHideFlags: 1 122 | m_PrefabParentObject: {fileID: 0} 123 | m_PrefabInternal: {fileID: 100100000} 124 | m_GameObject: {fileID: 1680193704231160} 125 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 126 | m_LocalPosition: {x: 0, y: 0, z: 0} 127 | m_LocalScale: {x: 1, y: 1, z: 1} 128 | m_Children: [] 129 | m_Father: {fileID: 224445155007366344} 130 | m_RootOrder: 1 131 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 132 | m_AnchorMin: {x: 0, y: 0} 133 | m_AnchorMax: {x: 1, y: 1} 134 | m_AnchoredPosition: {x: 0, y: 0} 135 | m_SizeDelta: {x: 0, y: 0} 136 | m_Pivot: {x: 0.5, y: 0.5} 137 | --- !u!224 &224346695023079036 138 | RectTransform: 139 | m_ObjectHideFlags: 1 140 | m_PrefabParentObject: {fileID: 0} 141 | m_PrefabInternal: {fileID: 100100000} 142 | m_GameObject: {fileID: 1509142172789454} 143 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 144 | m_LocalPosition: {x: 0, y: 0, z: 0} 145 | m_LocalScale: {x: 1, y: 1, z: 1} 146 | m_Children: [] 147 | m_Father: {fileID: 224445155007366344} 148 | m_RootOrder: 0 149 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 150 | m_AnchorMin: {x: 0, y: 0} 151 | m_AnchorMax: {x: 1, y: 1} 152 | m_AnchoredPosition: {x: 0, y: 0} 153 | m_SizeDelta: {x: 0, y: 0} 154 | m_Pivot: {x: 0.5, y: 0.5} 155 | --- !u!224 &224445155007366344 156 | RectTransform: 157 | m_ObjectHideFlags: 1 158 | m_PrefabParentObject: {fileID: 0} 159 | m_PrefabInternal: {fileID: 100100000} 160 | m_GameObject: {fileID: 1847978998306174} 161 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 162 | m_LocalPosition: {x: 0, y: 0, z: 0} 163 | m_LocalScale: {x: 1, y: 1, z: 1} 164 | m_Children: 165 | - {fileID: 224346695023079036} 166 | - {fileID: 224063892299672026} 167 | m_Father: {fileID: 0} 168 | m_RootOrder: 0 169 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 170 | m_AnchorMin: {x: 0.5, y: 0.5} 171 | m_AnchorMax: {x: 0.5, y: 0.5} 172 | m_AnchoredPosition: {x: 0, y: 0} 173 | m_SizeDelta: {x: 100, y: 100} 174 | m_Pivot: {x: 0.5, y: 0.5} 175 | -------------------------------------------------------------------------------- /Assets/Game/Prefabs/UICanvas.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 462e7a0cb8191e34d8e563026d06af5e 3 | timeCreated: 1510656045 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Game/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d627b3da7624f574a867af424e671802 3 | folderAsset: yes 4 | timeCreated: 1510653024 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Game/Scripts/GameController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using Proton; 3 | using UnityEngine; 4 | 5 | /// 6 | /// 游戏控制器(Main) 7 | /// 8 | public class GameController : MonoBehaviour 9 | { 10 | void Start() 11 | { 12 | DontDestroyOnLoad(this); 13 | Application.runInBackground = true; 14 | 15 | // 加载游戏 16 | Reload(); 17 | 18 | Debug.Log("=== The Game is RUNNING... ==="); 19 | } 20 | 21 | /// 22 | /// 重新加载游戏 23 | /// 24 | public void Reload() 25 | { 26 | // 在协程中执行游戏初始化,避免阻塞主进程造成界面卡顿 27 | StartCoroutine("Init"); 28 | 29 | // 打开登录界面 30 | UIManager.Instance.OpenPanel(""); 31 | } 32 | 33 | /// 34 | /// 初始化 35 | /// 36 | private IEnumerator Init() 37 | { 38 | yield return null; 39 | 40 | // 启动网络 41 | NetworkManager.Instance.Start(); 42 | 43 | // 初始化玩家信息 44 | PlayerManager.Instance.Init(); 45 | } 46 | 47 | private void FixedUpdate() 48 | { 49 | // 驱动网络模块 50 | NetworkManager.Instance.Update(); 51 | } 52 | } -------------------------------------------------------------------------------- /Assets/Game/Scripts/GameController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96ccbe45076662449a8b63dbd4a8d927 3 | timeCreated: 1510737769 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Game/Scripts/PlayerManager.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// 玩家管理类 3 | /// 4 | public class PlayerManager 5 | { 6 | /// 7 | /// 当前玩家 ID 8 | /// 9 | public string PlayerID; 10 | 11 | private static PlayerManager _instance; 12 | 13 | /// 14 | /// 获取 PlayerManager 实例 15 | /// 16 | public static PlayerManager Instance 17 | { 18 | get 19 | { 20 | if (_instance == null) 21 | { 22 | _instance = new PlayerManager(); 23 | } 24 | return _instance; 25 | } 26 | } 27 | 28 | /// 29 | /// 私有构造方法,防止单例模式下产生多个类的实例 30 | /// 31 | private PlayerManager() 32 | { 33 | // nothing to do here. 34 | } 35 | 36 | /// 37 | /// 初始化 38 | /// 39 | public void Init() 40 | { 41 | // 默认玩家 ID 为“游客” 42 | PlayerID = "tourist"; 43 | } 44 | } -------------------------------------------------------------------------------- /Assets/Game/Scripts/PlayerManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 478cf431d415f2640bfac9a0a890b186 3 | timeCreated: 1510908647 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Game/Scripts/ProtocolType.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// 协议类型列表 3 | /// 4 | public class ProtocolType 5 | { 6 | /// 7 | /// Ping 8 | /// 9 | public const string PING = "Ping"; 10 | 11 | /// 12 | /// 心跳 13 | /// 14 | public const string HEARTBEAT = "HeartBeat"; 15 | 16 | /// 17 | /// 用户注册 18 | /// 19 | public const string REGISTER = "Register"; 20 | 21 | /// 22 | /// 用户登录 23 | /// 24 | public const string LOGIN = "Login"; 25 | 26 | /// 27 | /// 用户登出 28 | /// 29 | public const string LOGOUT = "Logout"; 30 | 31 | /// 32 | /// 获取玩家列表 33 | /// 34 | public const string GET_LIST = "GetList"; 35 | 36 | /// 37 | /// 获取成就 38 | /// 39 | public const string GET_ACHIEVEMENT = "GetAchievement"; 40 | 41 | /// 42 | /// 获取房间列表 43 | /// 44 | public const string GET_ROOM_LIST = "GetRoomList"; 45 | 46 | /// 47 | /// 获取房间信息 48 | /// 49 | public const string GET_ROOM_INFO = "GetRoomInfo"; 50 | 51 | /// 52 | /// 创建房间 53 | /// 54 | public const string CREATE_ROOM = "CreateRoom"; 55 | 56 | /// 57 | /// 进入房间 58 | /// 59 | public const string ENTER_ROOM = "EnterRoom"; 60 | 61 | /// 62 | /// 离开房间 63 | /// 64 | public const string LEAVE_ROOM = "LeaveRoom"; 65 | 66 | /// 67 | /// 开始战斗 68 | /// 69 | public const string START_FIGHT = "StartFight"; 70 | 71 | /// 72 | /// 战斗 73 | /// 74 | public const string FIGHT = "Fight"; 75 | 76 | /// 77 | /// TrueSync数据 78 | /// 79 | public const string TRUESYNC = "TrueSyncData"; 80 | } -------------------------------------------------------------------------------- /Assets/Game/Scripts/ProtocolType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2dc917fab0a90c4e8df6e475f874a41 3 | timeCreated: 1510937674 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Game/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8af53d7b1e2362b4aa394bb00d7800c7 3 | folderAsset: yes 4 | timeCreated: 1510653024 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Game/_Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efe7c039225548046a5a55b6d1e11299 3 | folderAsset: yes 4 | timeCreated: 1510652876 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Game/_Scenes/MinimalOnlineGame.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: 8 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, g: 0, b: 0, 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: 3 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.37311953, g: 0.38074014, b: 0.3587274, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 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!1001 &1106470547 116 | Prefab: 117 | m_ObjectHideFlags: 0 118 | serializedVersion: 2 119 | m_Modification: 120 | m_TransformParent: {fileID: 0} 121 | m_Modifications: 122 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 123 | type: 2} 124 | propertyPath: m_LocalPosition.x 125 | value: 667 126 | objectReference: {fileID: 0} 127 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 128 | type: 2} 129 | propertyPath: m_LocalPosition.y 130 | value: 375 131 | objectReference: {fileID: 0} 132 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 133 | type: 2} 134 | propertyPath: m_LocalPosition.z 135 | value: 0 136 | objectReference: {fileID: 0} 137 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 138 | type: 2} 139 | propertyPath: m_LocalRotation.x 140 | value: 0 141 | objectReference: {fileID: 0} 142 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 143 | type: 2} 144 | propertyPath: m_LocalRotation.y 145 | value: 0 146 | objectReference: {fileID: 0} 147 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 148 | type: 2} 149 | propertyPath: m_LocalRotation.z 150 | value: 0 151 | objectReference: {fileID: 0} 152 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 153 | type: 2} 154 | propertyPath: m_LocalRotation.w 155 | value: 1 156 | objectReference: {fileID: 0} 157 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 158 | type: 2} 159 | propertyPath: m_RootOrder 160 | value: 1 161 | objectReference: {fileID: 0} 162 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 163 | type: 2} 164 | propertyPath: m_AnchoredPosition.x 165 | value: 0 166 | objectReference: {fileID: 0} 167 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 168 | type: 2} 169 | propertyPath: m_AnchoredPosition.y 170 | value: 0 171 | objectReference: {fileID: 0} 172 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 173 | type: 2} 174 | propertyPath: m_SizeDelta.x 175 | value: 100 176 | objectReference: {fileID: 0} 177 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 178 | type: 2} 179 | propertyPath: m_SizeDelta.y 180 | value: 100 181 | objectReference: {fileID: 0} 182 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 183 | type: 2} 184 | propertyPath: m_AnchorMin.x 185 | value: 0.5 186 | objectReference: {fileID: 0} 187 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 188 | type: 2} 189 | propertyPath: m_AnchorMin.y 190 | value: 0.5 191 | objectReference: {fileID: 0} 192 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 193 | type: 2} 194 | propertyPath: m_AnchorMax.x 195 | value: 0.5 196 | objectReference: {fileID: 0} 197 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 198 | type: 2} 199 | propertyPath: m_AnchorMax.y 200 | value: 0.5 201 | objectReference: {fileID: 0} 202 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 203 | type: 2} 204 | propertyPath: m_Pivot.x 205 | value: 0.5 206 | objectReference: {fileID: 0} 207 | - target: {fileID: 224445155007366344, guid: 462e7a0cb8191e34d8e563026d06af5e, 208 | type: 2} 209 | propertyPath: m_Pivot.y 210 | value: 0.5 211 | objectReference: {fileID: 0} 212 | - target: {fileID: 224063892299672026, guid: 462e7a0cb8191e34d8e563026d06af5e, 213 | type: 2} 214 | propertyPath: m_LocalPosition.x 215 | value: 0 216 | objectReference: {fileID: 0} 217 | - target: {fileID: 224063892299672026, guid: 462e7a0cb8191e34d8e563026d06af5e, 218 | type: 2} 219 | propertyPath: m_LocalPosition.y 220 | value: 0 221 | objectReference: {fileID: 0} 222 | - target: {fileID: 224346695023079036, guid: 462e7a0cb8191e34d8e563026d06af5e, 223 | type: 2} 224 | propertyPath: m_LocalPosition.x 225 | value: 0 226 | objectReference: {fileID: 0} 227 | - target: {fileID: 224346695023079036, guid: 462e7a0cb8191e34d8e563026d06af5e, 228 | type: 2} 229 | propertyPath: m_LocalPosition.y 230 | value: 0 231 | objectReference: {fileID: 0} 232 | m_RemovedComponents: [] 233 | m_ParentPrefab: {fileID: 100100000, guid: 462e7a0cb8191e34d8e563026d06af5e, type: 2} 234 | m_IsPrefabParent: 0 235 | --- !u!1001 &1451560108 236 | Prefab: 237 | m_ObjectHideFlags: 0 238 | serializedVersion: 2 239 | m_Modification: 240 | m_TransformParent: {fileID: 0} 241 | m_Modifications: 242 | - target: {fileID: 4770627652198908, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 243 | propertyPath: m_LocalPosition.x 244 | value: 0 245 | objectReference: {fileID: 0} 246 | - target: {fileID: 4770627652198908, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 247 | propertyPath: m_LocalPosition.y 248 | value: 0 249 | objectReference: {fileID: 0} 250 | - target: {fileID: 4770627652198908, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 251 | propertyPath: m_LocalPosition.z 252 | value: 0 253 | objectReference: {fileID: 0} 254 | - target: {fileID: 4770627652198908, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 255 | propertyPath: m_LocalRotation.x 256 | value: 0 257 | objectReference: {fileID: 0} 258 | - target: {fileID: 4770627652198908, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 259 | propertyPath: m_LocalRotation.y 260 | value: 0 261 | objectReference: {fileID: 0} 262 | - target: {fileID: 4770627652198908, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 263 | propertyPath: m_LocalRotation.z 264 | value: 0 265 | objectReference: {fileID: 0} 266 | - target: {fileID: 4770627652198908, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 267 | propertyPath: m_LocalRotation.w 268 | value: 1 269 | objectReference: {fileID: 0} 270 | - target: {fileID: 4770627652198908, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 271 | propertyPath: m_RootOrder 272 | value: 3 273 | objectReference: {fileID: 0} 274 | m_RemovedComponents: [] 275 | m_ParentPrefab: {fileID: 100100000, guid: 319364fbf51857e4792bf3e6a80d68be, type: 2} 276 | m_IsPrefabParent: 0 277 | --- !u!1 &1938921452 278 | GameObject: 279 | m_ObjectHideFlags: 0 280 | m_PrefabParentObject: {fileID: 0} 281 | m_PrefabInternal: {fileID: 0} 282 | serializedVersion: 5 283 | m_Component: 284 | - component: {fileID: 1938921456} 285 | - component: {fileID: 1938921455} 286 | - component: {fileID: 1938921454} 287 | - component: {fileID: 1938921453} 288 | m_Layer: 0 289 | m_Name: Main Camera 290 | m_TagString: MainCamera 291 | m_Icon: {fileID: 0} 292 | m_NavMeshLayer: 0 293 | m_StaticEditorFlags: 0 294 | m_IsActive: 1 295 | --- !u!81 &1938921453 296 | AudioListener: 297 | m_ObjectHideFlags: 0 298 | m_PrefabParentObject: {fileID: 0} 299 | m_PrefabInternal: {fileID: 0} 300 | m_GameObject: {fileID: 1938921452} 301 | m_Enabled: 1 302 | --- !u!124 &1938921454 303 | Behaviour: 304 | m_ObjectHideFlags: 0 305 | m_PrefabParentObject: {fileID: 0} 306 | m_PrefabInternal: {fileID: 0} 307 | m_GameObject: {fileID: 1938921452} 308 | m_Enabled: 1 309 | --- !u!20 &1938921455 310 | Camera: 311 | m_ObjectHideFlags: 0 312 | m_PrefabParentObject: {fileID: 0} 313 | m_PrefabInternal: {fileID: 0} 314 | m_GameObject: {fileID: 1938921452} 315 | m_Enabled: 1 316 | serializedVersion: 2 317 | m_ClearFlags: 3 318 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 319 | m_NormalizedViewPortRect: 320 | serializedVersion: 2 321 | x: 0 322 | y: 0 323 | width: 1 324 | height: 1 325 | near clip plane: 0.3 326 | far clip plane: 1000 327 | field of view: 60 328 | orthographic: 1 329 | orthographic size: 10 330 | m_Depth: 1 331 | m_CullingMask: 332 | serializedVersion: 2 333 | m_Bits: 32 334 | m_RenderingPath: -1 335 | m_TargetTexture: {fileID: 0} 336 | m_TargetDisplay: 0 337 | m_TargetEye: 3 338 | m_HDR: 1 339 | m_AllowMSAA: 1 340 | m_ForceIntoRT: 0 341 | m_OcclusionCulling: 1 342 | m_StereoConvergence: 10 343 | m_StereoSeparation: 0.022 344 | --- !u!4 &1938921456 345 | Transform: 346 | m_ObjectHideFlags: 0 347 | m_PrefabParentObject: {fileID: 0} 348 | m_PrefabInternal: {fileID: 0} 349 | m_GameObject: {fileID: 1938921452} 350 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 351 | m_LocalPosition: {x: 0, y: 1, z: -10} 352 | m_LocalScale: {x: 1, y: 1, z: 1} 353 | m_Children: [] 354 | m_Father: {fileID: 0} 355 | m_RootOrder: 0 356 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 357 | --- !u!1 &2123663399 358 | GameObject: 359 | m_ObjectHideFlags: 0 360 | m_PrefabParentObject: {fileID: 0} 361 | m_PrefabInternal: {fileID: 0} 362 | serializedVersion: 5 363 | m_Component: 364 | - component: {fileID: 2123663402} 365 | - component: {fileID: 2123663401} 366 | - component: {fileID: 2123663400} 367 | m_Layer: 0 368 | m_Name: EventSystem 369 | m_TagString: Untagged 370 | m_Icon: {fileID: 0} 371 | m_NavMeshLayer: 0 372 | m_StaticEditorFlags: 0 373 | m_IsActive: 1 374 | --- !u!114 &2123663400 375 | MonoBehaviour: 376 | m_ObjectHideFlags: 0 377 | m_PrefabParentObject: {fileID: 0} 378 | m_PrefabInternal: {fileID: 0} 379 | m_GameObject: {fileID: 2123663399} 380 | m_Enabled: 1 381 | m_EditorHideFlags: 0 382 | m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} 383 | m_Name: 384 | m_EditorClassIdentifier: 385 | m_HorizontalAxis: Horizontal 386 | m_VerticalAxis: Vertical 387 | m_SubmitButton: Submit 388 | m_CancelButton: Cancel 389 | m_InputActionsPerSecond: 10 390 | m_RepeatDelay: 0.5 391 | m_ForceModuleActive: 0 392 | --- !u!114 &2123663401 393 | MonoBehaviour: 394 | m_ObjectHideFlags: 0 395 | m_PrefabParentObject: {fileID: 0} 396 | m_PrefabInternal: {fileID: 0} 397 | m_GameObject: {fileID: 2123663399} 398 | m_Enabled: 1 399 | m_EditorHideFlags: 0 400 | m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} 401 | m_Name: 402 | m_EditorClassIdentifier: 403 | m_FirstSelected: {fileID: 0} 404 | m_sendNavigationEvents: 1 405 | m_DragThreshold: 5 406 | --- !u!4 &2123663402 407 | Transform: 408 | m_ObjectHideFlags: 0 409 | m_PrefabParentObject: {fileID: 0} 410 | m_PrefabInternal: {fileID: 0} 411 | m_GameObject: {fileID: 2123663399} 412 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 413 | m_LocalPosition: {x: 0, y: 0, z: 0} 414 | m_LocalScale: {x: 1, y: 1, z: 1} 415 | m_Children: [] 416 | m_Father: {fileID: 0} 417 | m_RootOrder: 2 418 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 419 | -------------------------------------------------------------------------------- /Assets/Game/_Scenes/MinimalOnlineGame.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25b5b976ea79133489ca4a43f52e757e 3 | timeCreated: 1510655338 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Proton.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e122098c9d81184d96a2473a0ab8302 3 | folderAsset: yes 4 | timeCreated: 1510738044 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Proton/Networking.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f0c6f6946ab04441923698f61e3e5c9 3 | folderAsset: yes 4 | timeCreated: 1510654742 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e8877874b0de5c4e8f0994940914fc7 3 | folderAsset: yes 4 | timeCreated: 1510897752 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Resources/NetworkConfig.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 8fb22d194dca0e14c880f3625b0d8d35, type: 3} 12 | m_Name: NetworkConfig 13 | m_EditorClassIdentifier: 14 | Host: caizicong.com 15 | Port: 9527 16 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Resources/NetworkConfig.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28ff63e571033c34998d3539afb15321 3 | timeCreated: 1510898100 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 11400000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e3f2ca36d03adc44bc98187dbeabf9e 3 | folderAsset: yes 4 | timeCreated: 1510897745 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/Connection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Sockets; 3 | using UnityEngine; 4 | 5 | namespace Proton 6 | { 7 | /// 8 | /// 网络连接类 9 | /// 10 | public class Connection 11 | { 12 | /// 13 | /// 连接状态 14 | /// 15 | public enum Status 16 | { 17 | // 未连接 18 | DISCONNECTED, 19 | 20 | // 已连接 21 | CONNECTED 22 | } 23 | 24 | // 本连接实例的连接状态 25 | public Status ConnStatus = Status.DISCONNECTED; 26 | 27 | // 客户端 Socket 28 | private Socket _socket; 29 | 30 | // 默认的数据传输协议 31 | private Protocol _proto = new ProtocolBytes(); 32 | 33 | // 默认的接收数据缓冲区大小 34 | private const int BUFFER_SIZE = 1024; 35 | 36 | // 接收数据缓冲区 37 | private byte[] _dataBuffer = new byte[BUFFER_SIZE]; 38 | 39 | // 当前缓存的字节数 40 | private int _bufferCount; 41 | 42 | // 消息包长度 43 | private Int32 _msgLength; 44 | 45 | // 表示消息包长度的字节数据(4 个字节) 46 | private byte[] _msgLenBytes = new byte[sizeof(UInt32)]; 47 | 48 | // 消息分发器 49 | private MessageDistributor _msgDistributor = new MessageDistributor(); 50 | 51 | // 心跳时间间隔 52 | private const float HeartbeatInterval = 30f; 53 | 54 | // 最后心跳时间 55 | private float _lastBeatTime; 56 | 57 | /// 58 | /// 每一帧处理消息分发 59 | /// 60 | public void Update() 61 | { 62 | // 分发待处理消息列表中的消息 63 | _msgDistributor.Update(); 64 | 65 | if (ConnStatus == Status.CONNECTED) 66 | { 67 | // 每到心跳时间,向服务端发送一条心跳消息,以表示该客户端存活 68 | if (Time.time - _lastBeatTime > HeartbeatInterval) 69 | { 70 | ProtocolBytes proto = new ProtocolBytes(); 71 | proto.AddString(ProtocolType.HEARTBEAT); 72 | 73 | Send(proto); 74 | 75 | _lastBeatTime = Time.time; 76 | } 77 | } 78 | } 79 | 80 | /// 81 | /// 与服务端建立 Socket 连接 82 | /// 83 | /// 连接是否建立成功 84 | public bool Connect() 85 | { 86 | NetworkConfig networkConfig = Resources.Load("NetworkConfig"); 87 | 88 | if (networkConfig == null) 89 | { 90 | Debug.LogError("[网络配置出错] 无法读取网络配置!"); 91 | return false; 92 | } 93 | 94 | Debug.Log("[服务端地址] " + networkConfig.Host + ":" + networkConfig.Port); 95 | 96 | return Connect(networkConfig.Host, networkConfig.Port); 97 | } 98 | 99 | /// 100 | /// 与服务端建立 Socket 连接 101 | /// 102 | /// 服务端主机地址 103 | /// 服务端 Socket 监听端口 104 | /// 连接是否建立成功 105 | public bool Connect(string host, int port) 106 | { 107 | // 如果连接已建立,则不再重复建立连接 108 | if (ConnStatus == Status.CONNECTED) 109 | { 110 | return true; 111 | } 112 | 113 | try 114 | { 115 | // 初始化客户端 Socket 116 | _socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, 117 | System.Net.Sockets.ProtocolType.Tcp); 118 | // 连接服务端 119 | _socket.Connect(host, port); 120 | // 异步接收服务端发来的数据 121 | _socket.BeginReceive(_dataBuffer, _bufferCount, BUFFER_SIZE - _bufferCount, SocketFlags.None, 122 | DataReceivedCallback, 123 | _dataBuffer); 124 | 125 | // 设置连接状态为“已连接” 126 | ConnStatus = Status.CONNECTED; 127 | 128 | Debug.Log("[建立连接成功] 与服务端 " + host + ":" + port + " 建立 Socket 连接成功"); 129 | 130 | return true; 131 | } 132 | catch (Exception e) 133 | { 134 | Debug.LogError("[建立连接出错] 与服务端 " + host + ":" + port + " 建立 Socket 连接失败!\n" + e.Message); 135 | return false; 136 | } 137 | } 138 | 139 | /// 140 | /// 连接是否存活 141 | /// 142 | /// 连接是否存活 143 | public bool IsAlive() 144 | { 145 | if (ConnStatus == Status.DISCONNECTED || !_socket.Connected) 146 | { 147 | return false; 148 | } 149 | 150 | return true; 151 | } 152 | 153 | /// 154 | /// 关闭 Socket 连接 155 | /// 156 | /// 是否关闭成功 157 | public bool Close() 158 | { 159 | try 160 | { 161 | _socket.Close(); 162 | 163 | ConnStatus = Status.DISCONNECTED; 164 | 165 | return true; 166 | } 167 | catch (Exception e) 168 | { 169 | Debug.LogError("[关闭连接出错] 关闭 Socket 连接失败!\n" + e.Message); 170 | return false; 171 | } 172 | } 173 | 174 | /// 175 | /// 向服务端发送数据 176 | /// 177 | /// 协议消息包 178 | /// 是否发送成功 179 | public bool Send(Protocol proto) 180 | { 181 | if (ConnStatus != Status.CONNECTED) 182 | { 183 | Debug.LogWarning("[连接未就绪] 网络连接未就绪,无法发送信息!"); 184 | return false; 185 | } 186 | 187 | // 打包数据 188 | byte[] data = proto.Pack(); 189 | // 发送数据 190 | _socket.Send(data); 191 | 192 | return true; 193 | } 194 | 195 | /// 196 | /// 向服务端发送数据,并注册动作监听器 197 | /// 198 | /// 协议消息包 199 | /// 协议名称 200 | /// 动作监听器 201 | /// 202 | public bool Send(Protocol proto, string protoName, MessageDistributor.MessageListener listener) 203 | { 204 | if (ConnStatus != Status.CONNECTED) 205 | { 206 | return false; 207 | } 208 | 209 | // 注册动作监听器 210 | _msgDistributor.AddActionListener(protoName, listener); 211 | 212 | Debug.Log("[向服务端发送数据] " + protoName); 213 | 214 | return Send(proto); 215 | } 216 | 217 | /// 218 | /// 向服务端发送数据,并注册动作监听器 219 | /// 220 | /// 协议消息包 221 | /// 动作监听器 222 | /// 223 | public bool Send(Protocol proto, MessageDistributor.MessageListener listener) 224 | { 225 | string protoName = proto.GetName(); 226 | return Send(proto, protoName, listener); 227 | } 228 | 229 | /// 230 | /// 向消息分发器注册事件监听器 231 | /// 232 | /// 协议名称 233 | /// 事件监听器 234 | public void AddEventListener(string protoName, MessageDistributor.MessageListener listener) 235 | { 236 | _msgDistributor.AddEventListener(protoName, listener); 237 | } 238 | 239 | /// 240 | /// 从消息分发器移除事件监听器 241 | /// 242 | /// 协议名称 243 | /// 事件监听器 244 | public void RemoveEventListener(string protoName, MessageDistributor.MessageListener listener) 245 | { 246 | _msgDistributor.RemoveEventListener(protoName, listener); 247 | } 248 | 249 | /// 250 | /// 数据接收回调方法 251 | /// 252 | private void DataReceivedCallback(IAsyncResult ar) 253 | { 254 | try 255 | { 256 | if (!_socket.Connected) 257 | { 258 | return; 259 | } 260 | 261 | int dataCount = _socket.EndReceive(ar); 262 | _bufferCount += dataCount; 263 | 264 | // 读取并处理数据 265 | ProcessData(); 266 | 267 | // 继续异步接收数据 268 | _socket.BeginReceive(_dataBuffer, _bufferCount, BUFFER_SIZE - _bufferCount, SocketFlags.None, 269 | DataReceivedCallback, 270 | _dataBuffer); 271 | } 272 | catch (Exception e) 273 | { 274 | Debug.LogError(e.Message); 275 | } 276 | } 277 | 278 | /// 279 | /// 从缓冲区中读取并处理数据 280 | /// 281 | private void ProcessData() 282 | { 283 | // 缓存的字节数小于 4 个字节,即消息包长度信息不完整,暂不处理 284 | if (_bufferCount < sizeof(Int32)) 285 | { 286 | return; 287 | } 288 | 289 | // 获取消息包长度 290 | Array.Copy(_dataBuffer, _msgLenBytes, sizeof(Int32)); 291 | _msgLength = BitConverter.ToInt32(_msgLenBytes, 0); 292 | 293 | // 消息包未接收完整,暂不处理 294 | if (_bufferCount < sizeof(Int32) + _msgLength) 295 | { 296 | return; 297 | } 298 | 299 | // 解码消息包 300 | Protocol msgProto = _proto.Decode(_dataBuffer, sizeof(Int32), _msgLength); 301 | 302 | // 添加到待处理的消息列表中 303 | lock (_msgDistributor.MessageList) 304 | { 305 | _msgDistributor.MessageList.Add(msgProto); 306 | } 307 | 308 | // 缓冲区中余下未处理的字节数 309 | int bytesRemaining = _bufferCount - _msgLength - sizeof(Int32); 310 | 311 | // TODO: 这种做法比较低效 312 | // 清除缓冲区中已处理的消息字节 313 | Array.Copy(_dataBuffer, sizeof(Int32) + _msgLength, _dataBuffer, 0, bytesRemaining); 314 | 315 | // 如果缓冲区中还有未处理的消息,则递归调用 ProcessData 方法,实现循环处理 316 | _bufferCount = bytesRemaining; 317 | if (_bufferCount > 0) 318 | { 319 | ProcessData(); 320 | } 321 | } 322 | } 323 | } -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/Connection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af9411b1d01c6ff43bde5fd6ecefab14 3 | timeCreated: 1510740738 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/MessageDistributor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Proton 4 | { 5 | /// 6 | /// 消息分发器 7 | /// 8 | public class MessageDistributor 9 | { 10 | // 待处理的消息列表 11 | public List MessageList = new List(); 12 | 13 | // 消息监听器委托 14 | public delegate void MessageListener(Protocol proto); 15 | 16 | // 每一帧处理的消息数 17 | private const int PROCESS_COUNT_PER_FRAME = 15; 18 | 19 | // 事件消息监听表(事件消息监听器委托注册一次后,持续监听该类型的消息) 20 | private Dictionary _eventDict = new Dictionary(); 21 | 22 | // 动作消息监听表(动作消息监听器委托注册一次后,在接收到应答消息后即移除) 23 | private Dictionary _actionDict = new Dictionary(); 24 | 25 | /// 26 | /// 每一帧处理消息列表中的 N 个消息包 27 | /// 28 | public void Update() 29 | { 30 | for (int i = 0; i < PROCESS_COUNT_PER_FRAME; i++) 31 | { 32 | if (MessageList.Count > 0) 33 | { 34 | // 向对应消息监听器分发消息列表中的消息包 35 | DistributeMessage(MessageList[0]); 36 | 37 | lock (MessageList) 38 | { 39 | MessageList.RemoveAt(0); 40 | } 41 | } 42 | else 43 | { 44 | break; 45 | } 46 | } 47 | } 48 | 49 | /// 50 | /// 添加事件监听器 51 | /// 52 | /// 协议名称 53 | /// 事件监听器 54 | public void AddEventListener(string protoName, MessageListener listener) 55 | { 56 | if (_eventDict.ContainsKey(protoName)) 57 | { 58 | _eventDict[protoName] += listener; 59 | } 60 | else 61 | { 62 | _eventDict[protoName] = listener; 63 | } 64 | } 65 | 66 | /// 67 | /// 移除事件监听器 68 | /// 69 | /// 协议名称 70 | /// 事件监听器 71 | public void RemoveEventListener(string protoName, MessageListener listener) 72 | { 73 | if (_eventDict.ContainsKey(protoName)) 74 | { 75 | _eventDict[protoName] -= listener; 76 | 77 | if (_eventDict[protoName] == null) 78 | { 79 | _eventDict.Remove(protoName); 80 | } 81 | } 82 | } 83 | 84 | /// 85 | /// 添加动作监听器 86 | /// 87 | /// 协议名称 88 | /// 动作监听器 89 | public void AddActionListener(string protoName, MessageListener listener) 90 | { 91 | if (_actionDict.ContainsKey(protoName)) 92 | { 93 | _actionDict[protoName] += listener; 94 | } 95 | else 96 | { 97 | _actionDict[protoName] = listener; 98 | } 99 | } 100 | 101 | /// 102 | /// 移除动作监听器 103 | /// 104 | /// 协议名称 105 | /// 动作监听器 106 | public void RemoveActionListener(string protoName, MessageListener listener) 107 | { 108 | if (_actionDict.ContainsKey(protoName)) 109 | { 110 | _actionDict[protoName] -= listener; 111 | 112 | if (_actionDict[protoName] == null) 113 | { 114 | _actionDict.Remove(protoName); 115 | } 116 | } 117 | } 118 | 119 | /// 120 | /// 向各消息监听器分发消息协议包 121 | /// 122 | /// 消息协议包 123 | private void DistributeMessage(Protocol proto) 124 | { 125 | // 获取协议名称 126 | string protoName = proto.GetName(); 127 | 128 | // 分发事件应答消息包 129 | if (_eventDict.ContainsKey(protoName)) 130 | { 131 | _eventDict[protoName](proto); 132 | } 133 | 134 | // 分发动作应答消息包 135 | if (_actionDict.ContainsKey(protoName)) 136 | { 137 | _actionDict[protoName](proto); 138 | 139 | // 移除动作监听 140 | _actionDict[protoName] = null; 141 | _actionDict.Remove(protoName); 142 | } 143 | } 144 | } 145 | } -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/MessageDistributor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbf4b7a9aa3f8e743ae111c2e19fefac 3 | timeCreated: 1510828574 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/NetworkConfig.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Proton 4 | { 5 | /// 6 | /// 网络配置 7 | /// 8 | [CreateAssetMenu(fileName = "NetworkConfig", menuName = "Proton/NetworkConfig", order = 0)] 9 | public class NetworkConfig : ScriptableObject 10 | { 11 | /// 12 | /// 服务端主机地址 13 | /// 14 | public string Host = "127.0.0.1"; 15 | 16 | /// 17 | /// 服务端 Socket 监听端口号 18 | /// 19 | public int Port = 9527; 20 | } 21 | } -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/NetworkConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fb22d194dca0e14c880f3625b0d8d35 3 | timeCreated: 1510897786 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/NetworkManager.cs: -------------------------------------------------------------------------------- 1 | namespace Proton 2 | { 3 | /// 4 | /// 网络管理类 5 | /// 6 | public class NetworkManager 7 | { 8 | // 与服务端网络连接 9 | public Connection ServerConn = new Connection(); 10 | 11 | // 网络状态 12 | public NetworkStatus NetworkStatus = new NetworkStatus(); 13 | 14 | private static NetworkManager _instance; 15 | 16 | /// 17 | /// 获取 NetworkManager 实例 18 | /// 19 | public static NetworkManager Instance 20 | { 21 | get 22 | { 23 | if (_instance == null) 24 | { 25 | _instance = new NetworkManager(); 26 | } 27 | return _instance; 28 | } 29 | } 30 | 31 | /// 32 | /// 私有构造方法,防止单例模式下产生多个类的实例 33 | /// 34 | private NetworkManager() 35 | { 36 | // nothing to do here. 37 | } 38 | 39 | /// 40 | /// 启动网络 41 | /// 42 | public void Start() 43 | { 44 | // 连接服务端 45 | ServerConn.Connect(); 46 | 47 | // 初始化网络状态监听 48 | NetworkStatus.Init(); 49 | } 50 | 51 | /// 52 | /// 每一帧处理网络事件 53 | /// 54 | public void Update() 55 | { 56 | // 驱动消息分发、心跳报告等 57 | ServerConn.Update(); 58 | 59 | // 驱动网络状态监听 60 | NetworkStatus.Update(); 61 | } 62 | 63 | /// 64 | /// 网络连接是否可用 65 | /// 66 | /// 网络连接是否可用 67 | public bool IsAvailable() 68 | { 69 | return ServerConn.IsAlive(); 70 | } 71 | 72 | /// 73 | /// 关闭网络 74 | /// 75 | public void Shutdown() 76 | { 77 | // 停止网络状态监听 78 | NetworkStatus.Shutdown(); 79 | 80 | // 关闭 Socket 连接 81 | ServerConn.Close(); 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/NetworkManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 354988f88deedd0459ebf3167c17a92f 3 | timeCreated: 1510738074 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/NetworkStatus.cs: -------------------------------------------------------------------------------- 1 | using Proton; 2 | using UnityEngine; 3 | 4 | /// 5 | /// 网络状态 6 | /// 7 | public class NetworkStatus 8 | { 9 | /// 10 | /// 平均延迟(毫秒) 11 | /// 12 | public float RoundTripTime 13 | { 14 | get { return _lastRtt; } 15 | } 16 | 17 | // 监听是否启用 18 | private bool _isActive; 19 | 20 | // 计数器 21 | private int _tick; 22 | 23 | // 总延迟 = 延迟1 + 延迟2 + 延迟3 + ...,单位为秒 24 | private float _rttSum; 25 | 26 | // 延迟计数(每次往 RTTSum 中加入一个延迟,该值加一) 27 | private int _rttCount; 28 | 29 | // 最后一个平均延迟 = 总延迟/延迟计数,单位为毫秒 30 | private float _lastRtt; 31 | 32 | /// 33 | /// 初始化网络状态监听 34 | /// 35 | public void Init() 36 | { 37 | // 向消息分发器注册接收到 Ping 消息事件的监听回调方法 38 | NetworkManager.Instance.ServerConn.AddEventListener(ProtocolType.PING, RecvPingCallback); 39 | 40 | Pause(); 41 | } 42 | 43 | /// 44 | /// 开始监听 45 | /// 46 | public void Start() 47 | { 48 | _isActive = true; 49 | } 50 | 51 | /// 52 | /// 暂停监听 53 | /// 54 | public void Pause() 55 | { 56 | _isActive = false; 57 | } 58 | 59 | /// 60 | /// 停止网络状态监听 61 | /// 62 | public void Shutdown() 63 | { 64 | Pause(); 65 | 66 | // 从消息分发器移除接收到 Ping 消息事件的监听回调方法 67 | NetworkManager.Instance.ServerConn.RemoveEventListener(ProtocolType.PING, RecvPingCallback); 68 | } 69 | 70 | /// 71 | /// 每一帧执行一次 72 | /// 73 | public void Update() 74 | { 75 | if (_isActive) 76 | { 77 | // 每隔 5 帧向服务端发送一个 Ping 消息,以测试网络延迟 78 | if (_tick++ >= 4) 79 | { 80 | // 组装 Ping 协议消息 81 | ProtocolBytes proto = new ProtocolBytes(); 82 | proto.AddString(ProtocolType.PING); 83 | proto.AddFloat(Time.time); 84 | 85 | // 发送 86 | NetworkManager.Instance.ServerConn.Send(proto); 87 | 88 | _tick = 0; 89 | } 90 | } 91 | } 92 | 93 | /// 94 | /// 接收到 Ping 消息应答的回调方法 95 | /// 96 | /// 97 | private void RecvPingCallback(Protocol proto) 98 | { 99 | ProtocolBytes responseProto = (ProtocolBytes) proto; 100 | 101 | int start = 0; 102 | 103 | // 协议名称,暂时无用,但需要从字节流中先读取出来 104 | string unused = responseProto.GetString(start, ref start); 105 | 106 | // 获取 Ping 消息时间戳 107 | float pingTime = responseProto.GetFloat(start, ref start); 108 | 109 | // 计算网络延迟 110 | AddRtt(Time.time - pingTime); 111 | } 112 | 113 | /// 114 | /// 延迟累计 115 | /// 116 | /// 网络延迟,单位为秒 117 | private void AddRtt(float rtt) 118 | { 119 | _rttSum += rtt; 120 | _rttCount++; 121 | 122 | // 每累积 5 个延迟数据则计算一次平均延迟 123 | if (_rttCount > 4) 124 | { 125 | // 计算平均延迟,并转换为毫秒 126 | _lastRtt = _rttSum / _rttCount * 1000f; 127 | ResetRtt(); 128 | } 129 | } 130 | 131 | /// 132 | /// 重置延迟相关计数器 133 | /// 134 | private void ResetRtt() 135 | { 136 | _rttSum = 0.0f; 137 | _rttCount = 0; 138 | } 139 | } -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/NetworkStatus.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 958a8c8bdde80dc4c97826a38559c6b6 3 | timeCreated: 1511191764 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/Protocol.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace Proton 5 | { 6 | /// 7 | /// 协议基类 8 | /// 9 | public class Protocol 10 | { 11 | /// 12 | /// 解码 readbuf 中从 start 开始的 length 字节 13 | /// 14 | /// 字节数组 15 | /// 开始的字节下标 16 | /// 解码的字节长度 17 | /// 协议类的实例 18 | public virtual Protocol Decode(byte[] readbuf, int start, int length) 19 | { 20 | return new Protocol(); 21 | } 22 | 23 | /// 24 | /// 编码 25 | /// 26 | /// 消息字节数组 27 | public virtual byte[] Encode() 28 | { 29 | return new byte[] { }; 30 | } 31 | 32 | /// 33 | /// 打包成协议消息包(在编码后的字节数组前面添加一个4字节的int,描述消息的总长度) 34 | /// 35 | /// 消息包的字节数组 36 | public virtual byte[] Pack() 37 | { 38 | byte[] msgBytes = Encode(); 39 | byte[] lenBytes = BitConverter.GetBytes(msgBytes.Length); 40 | byte[] data = lenBytes.Concat(msgBytes).ToArray(); 41 | 42 | return data; 43 | } 44 | 45 | /// 46 | /// 获取协议名称 47 | /// 48 | /// 协议名称 49 | public virtual string GetName() 50 | { 51 | return ""; 52 | } 53 | 54 | /// 55 | /// 获取协议描述 56 | /// 57 | /// 协议描述 58 | public virtual string GetDesc() 59 | { 60 | return ""; 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/Protocol.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fb686b25f2ea2a45b7f1c16b7622006 3 | timeCreated: 1510742037 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/ProtocolBytes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Text; 4 | 5 | namespace Proton 6 | { 7 | /// 8 | /// 字节流协议 9 | /// 10 | public class ProtocolBytes : Protocol 11 | { 12 | /// 13 | /// 协议数据包中的字节流 14 | /// 15 | private byte[] _bytes; 16 | 17 | public byte[] Bytes 18 | { 19 | get { return _bytes; } 20 | set { _bytes = value; } 21 | } 22 | 23 | /// 24 | /// 解码 readbuf 中从 start 开始的 length 字节 25 | /// 26 | public override Protocol Decode(byte[] readbuf, int start, int length) 27 | { 28 | ProtocolBytes proto = new ProtocolBytes(); 29 | 30 | if (length > 0) 31 | { 32 | proto.Bytes = new byte[length]; 33 | Array.Copy(readbuf, start, proto.Bytes, 0, length); 34 | } 35 | 36 | return proto; 37 | } 38 | 39 | /// 40 | /// 编码 41 | /// 42 | public override byte[] Encode() 43 | { 44 | return _bytes; 45 | } 46 | 47 | /// 48 | /// 获取协议名称 49 | /// 50 | public override string GetName() 51 | { 52 | return GetString(0); 53 | } 54 | 55 | /// 56 | /// 获取协议描述 57 | /// 58 | public override string GetDesc() 59 | { 60 | if (_bytes == null) 61 | { 62 | return ""; 63 | } 64 | 65 | StringBuilder sb = new StringBuilder(); 66 | 67 | for (int i = 0; i < _bytes.Length; i++) 68 | { 69 | int data = _bytes[i]; 70 | sb.Append(data).Append(" "); 71 | } 72 | 73 | return sb.ToString(); 74 | } 75 | 76 | /// 77 | /// 添加一个字节 78 | /// 79 | /// 80 | public void AddByte(byte bt) 81 | { 82 | AddBytes(new[] {bt}); 83 | } 84 | 85 | /// 86 | /// 获取一个字节 87 | /// 88 | public byte GetByte(int start, ref int end) 89 | { 90 | return GetBytes(start, ref end).First(); 91 | } 92 | 93 | /// 94 | /// 添加字节数组 95 | /// 96 | public void AddBytes(byte[] bytes) 97 | { 98 | Int32 bytesLen = bytes.Length; 99 | byte[] bytesLenBytes = BitConverter.GetBytes(bytesLen); 100 | 101 | if (_bytes == null) 102 | { 103 | _bytes = bytesLenBytes.Concat(bytes).ToArray(); 104 | } 105 | else 106 | { 107 | _bytes = _bytes.Concat(bytesLenBytes).Concat(bytes).ToArray(); 108 | } 109 | } 110 | 111 | /// 112 | /// 从字节流中获取从下标 start 开始到 end 结束的字节数组 113 | /// 114 | public byte[] GetBytes(int start, ref int end) 115 | { 116 | if (_bytes == null) 117 | { 118 | return null; 119 | } 120 | 121 | if (_bytes.Length < start + sizeof(Int32)) 122 | { 123 | return null; 124 | } 125 | 126 | Int32 bytesLen = BitConverter.ToInt32(_bytes, start); 127 | if (_bytes.Length < start + sizeof(Int32) + bytesLen) 128 | { 129 | return null; 130 | } 131 | 132 | byte[] bytes = new byte[bytesLen]; 133 | 134 | // TODO: 这两种从字节数组中获取部分字节数组的方式,哪种更高效一些呢? 135 | // way 1: 136 | // bytes = _bytes.Skip(start + sizeof(Int32)).Take(bytesLen).ToArray(); 137 | // way 2: 138 | Array.Copy(_bytes, start + sizeof(Int32), bytes, 0, bytesLen); 139 | 140 | end = start + sizeof(Int32) + bytesLen; 141 | 142 | return bytes; 143 | } 144 | 145 | /// 146 | /// 添加字符串 147 | /// 148 | public void AddString(string str) 149 | { 150 | Int32 strLen = str.Length; 151 | byte[] strLenBytes = BitConverter.GetBytes(strLen); 152 | 153 | byte[] strBytes = Encoding.UTF8.GetBytes(str); 154 | if (_bytes == null) 155 | { 156 | _bytes = strLenBytes.Concat(strBytes).ToArray(); 157 | } 158 | else 159 | { 160 | _bytes = _bytes.Concat(strLenBytes).Concat(strBytes).ToArray(); 161 | } 162 | } 163 | 164 | /// 165 | /// 从字节流中获取从下标 start 开始到 end 结束的字符串 166 | /// 167 | public string GetString(int start, ref int end) 168 | { 169 | if (_bytes == null) 170 | { 171 | return ""; 172 | } 173 | 174 | if (_bytes.Length < start + sizeof(Int32)) 175 | { 176 | return ""; 177 | } 178 | 179 | Int32 strLen = BitConverter.ToInt32(_bytes, start); 180 | if (_bytes.Length < start + sizeof(Int32) + strLen) 181 | { 182 | return ""; 183 | } 184 | 185 | string str = Encoding.UTF8.GetString(_bytes, start + sizeof(Int32), strLen); 186 | 187 | end = start + sizeof(Int32) + strLen; 188 | 189 | return str; 190 | } 191 | 192 | /// 193 | /// 从字节流中获取从下标 start 开始的一个字符串 194 | /// 195 | public string GetString(int start) 196 | { 197 | int end = 0; 198 | return GetString(start, ref end); 199 | } 200 | 201 | /// 202 | /// 添加一个整数 203 | /// 204 | public void AddInt(int num) 205 | { 206 | byte[] numBytes = BitConverter.GetBytes(num); 207 | 208 | if (_bytes == null) 209 | { 210 | _bytes = numBytes; 211 | } 212 | else 213 | { 214 | _bytes = _bytes.Concat(numBytes).ToArray(); 215 | } 216 | } 217 | 218 | /// 219 | /// 从字节流中获取从下标 start 开始到 end 结束的整数 220 | /// 221 | public int GetInt(int start, ref int end) 222 | { 223 | if (_bytes == null) 224 | { 225 | return 0; 226 | } 227 | 228 | if (_bytes.Length < start + sizeof(Int32)) 229 | { 230 | return 0; 231 | } 232 | 233 | int num = BitConverter.ToInt32(_bytes, start); 234 | 235 | end = start + sizeof(Int32); 236 | 237 | return num; 238 | } 239 | 240 | /// 241 | /// 从字节流中获取从下标 start 开始的一个整数 242 | /// 243 | public int GetInt(int start) 244 | { 245 | int end = 0; 246 | return GetInt(start, ref end); 247 | } 248 | 249 | /// 250 | /// 添加一个浮点数 251 | /// 252 | public void AddFloat(float num) 253 | { 254 | byte[] numBytes = BitConverter.GetBytes(num); 255 | 256 | if (_bytes == null) 257 | { 258 | _bytes = numBytes; 259 | } 260 | else 261 | { 262 | _bytes = _bytes.Concat(numBytes).ToArray(); 263 | } 264 | } 265 | 266 | /// 267 | /// 从字节流中获取从下标 start 开始到 end 结束的浮点数 268 | /// 269 | public float GetFloat(int start, ref int end) 270 | { 271 | if (_bytes == null) 272 | { 273 | return 0.0f; 274 | } 275 | 276 | if (_bytes.Length < start + sizeof(float)) 277 | { 278 | return 0.0f; 279 | } 280 | 281 | float num = BitConverter.ToSingle(_bytes, start); 282 | 283 | end = start + sizeof(float); 284 | 285 | return num; 286 | } 287 | 288 | /// 289 | /// 从字节流中获取从下标 start 开始的一个浮点数 290 | /// 291 | public float GetFloat(int start) 292 | { 293 | int end = 0; 294 | return GetFloat(start, ref end); 295 | } 296 | } 297 | } -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/ProtocolBytes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c4696ea07751d647af7e66e0d34ecdd 3 | timeCreated: 1510744549 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/ProtocolStr.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | 3 | namespace Proton 4 | { 5 | /// 6 | /// 字符串协议 7 | /// 8 | public class ProtocolStr : Protocol 9 | { 10 | /// 11 | /// 协议数据包中的字符串 12 | /// 13 | private string _str; 14 | 15 | public string Str 16 | { 17 | get { return _str; } 18 | set { _str = value; } 19 | } 20 | 21 | /// 22 | /// 解码 readbuf 中从 start 开始的 length 字节 23 | /// 24 | public override Protocol Decode(byte[] readbuf, int start, int length) 25 | { 26 | ProtocolStr proto = new ProtocolStr(); 27 | 28 | proto.Str = Encoding.UTF8.GetString(readbuf, start, length); 29 | return proto; 30 | } 31 | 32 | /// 33 | /// 编码 34 | /// 35 | public override byte[] Encode() 36 | { 37 | byte[] bytes = Encoding.UTF8.GetBytes(_str); 38 | return bytes; 39 | } 40 | 41 | /// 42 | /// 获取协议名称 43 | /// 44 | public override string GetName() 45 | { 46 | if (_str.Length == 0) 47 | { 48 | return ""; 49 | } 50 | 51 | string name = _str.Split(',')[0]; 52 | return name; 53 | } 54 | 55 | /// 56 | /// 获取协议描述 57 | /// 58 | public override string GetDesc() 59 | { 60 | return _str; 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /Assets/Proton/Networking/Scripts/ProtocolStr.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5f9359bdea7c9a49bf3b51b69fac6d7 3 | timeCreated: 1510744559 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7429baaacc99b7b4aa6e5fc7c777e7d9 3 | folderAsset: yes 4 | timeCreated: 1510658959 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UI/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12a68a9d5b6112246a95bb83bd8a9db6 3 | folderAsset: yes 4 | timeCreated: 1510653024 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UI/Resources/AlertPanel.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1459481734709870} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1012316364714090 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 224746492422744312} 22 | - component: {fileID: 222869439357253394} 23 | - component: {fileID: 114052326107786708} 24 | m_Layer: 5 25 | m_Name: BgImage 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1073526749823662 32 | GameObject: 33 | m_ObjectHideFlags: 0 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 5 37 | m_Component: 38 | - component: {fileID: 224328884413908618} 39 | - component: {fileID: 222987668177107176} 40 | - component: {fileID: 114148989936868144} 41 | m_Layer: 5 42 | m_Name: MessageText 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!1 &1323328217397886 49 | GameObject: 50 | m_ObjectHideFlags: 0 51 | m_PrefabParentObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | serializedVersion: 5 54 | m_Component: 55 | - component: {fileID: 224324640082868626} 56 | - component: {fileID: 222989370733023962} 57 | - component: {fileID: 114498261527715652} 58 | - component: {fileID: 114920634000773172} 59 | m_Layer: 5 60 | m_Name: ConfirmBtn 61 | m_TagString: Untagged 62 | m_Icon: {fileID: 0} 63 | m_NavMeshLayer: 0 64 | m_StaticEditorFlags: 0 65 | m_IsActive: 1 66 | --- !u!1 &1363547213689662 67 | GameObject: 68 | m_ObjectHideFlags: 1 69 | m_PrefabParentObject: {fileID: 0} 70 | m_PrefabInternal: {fileID: 100100000} 71 | serializedVersion: 5 72 | m_Component: 73 | - component: {fileID: 224428006683731742} 74 | - component: {fileID: 222085269385939038} 75 | - component: {fileID: 114904046682528420} 76 | m_Layer: 5 77 | m_Name: Text 78 | m_TagString: Untagged 79 | m_Icon: {fileID: 0} 80 | m_NavMeshLayer: 0 81 | m_StaticEditorFlags: 0 82 | m_IsActive: 1 83 | --- !u!1 &1459481734709870 84 | GameObject: 85 | m_ObjectHideFlags: 0 86 | m_PrefabParentObject: {fileID: 0} 87 | m_PrefabInternal: {fileID: 100100000} 88 | serializedVersion: 5 89 | m_Component: 90 | - component: {fileID: 224026598352648068} 91 | - component: {fileID: 222193726845816144} 92 | - component: {fileID: 114589197135618856} 93 | m_Layer: 5 94 | m_Name: AlertPanel 95 | m_TagString: Untagged 96 | m_Icon: {fileID: 0} 97 | m_NavMeshLayer: 0 98 | m_StaticEditorFlags: 0 99 | m_IsActive: 1 100 | --- !u!1 &1475971210066786 101 | GameObject: 102 | m_ObjectHideFlags: 1 103 | m_PrefabParentObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | serializedVersion: 5 106 | m_Component: 107 | - component: {fileID: 224469625183292594} 108 | - component: {fileID: 222661215438390578} 109 | - component: {fileID: 114163237207758554} 110 | m_Layer: 5 111 | m_Name: TitleText 112 | m_TagString: Untagged 113 | m_Icon: {fileID: 0} 114 | m_NavMeshLayer: 0 115 | m_StaticEditorFlags: 0 116 | m_IsActive: 1 117 | --- !u!114 &114052326107786708 118 | MonoBehaviour: 119 | m_ObjectHideFlags: 1 120 | m_PrefabParentObject: {fileID: 0} 121 | m_PrefabInternal: {fileID: 100100000} 122 | m_GameObject: {fileID: 1012316364714090} 123 | m_Enabled: 1 124 | m_EditorHideFlags: 0 125 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 126 | m_Name: 127 | m_EditorClassIdentifier: 128 | m_Material: {fileID: 0} 129 | m_Color: {r: 1, g: 1, b: 1, a: 1} 130 | m_RaycastTarget: 1 131 | m_OnCullStateChanged: 132 | m_PersistentCalls: 133 | m_Calls: [] 134 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 135 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 136 | m_Sprite: {fileID: 21300000, guid: 1a03964218d1068468d5fdc1236b64b1, type: 3} 137 | m_Type: 1 138 | m_PreserveAspect: 0 139 | m_FillCenter: 1 140 | m_FillMethod: 4 141 | m_FillAmount: 1 142 | m_FillClockwise: 1 143 | m_FillOrigin: 0 144 | --- !u!114 &114148989936868144 145 | MonoBehaviour: 146 | m_ObjectHideFlags: 1 147 | m_PrefabParentObject: {fileID: 0} 148 | m_PrefabInternal: {fileID: 100100000} 149 | m_GameObject: {fileID: 1073526749823662} 150 | m_Enabled: 1 151 | m_EditorHideFlags: 0 152 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 153 | m_Name: 154 | m_EditorClassIdentifier: 155 | m_Material: {fileID: 0} 156 | m_Color: {r: 0.9191176, g: 0.9191176, b: 0.9191176, a: 1} 157 | m_RaycastTarget: 1 158 | m_OnCullStateChanged: 159 | m_PersistentCalls: 160 | m_Calls: [] 161 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 162 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 163 | m_FontData: 164 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 165 | m_FontSize: 28 166 | m_FontStyle: 0 167 | m_BestFit: 0 168 | m_MinSize: 2 169 | m_MaxSize: 40 170 | m_Alignment: 4 171 | m_AlignByGeometry: 0 172 | m_RichText: 1 173 | m_HorizontalOverflow: 0 174 | m_VerticalOverflow: 0 175 | m_LineSpacing: 1 176 | m_Text: "\u7528\u6237\u540D\u5BC6\u7801\u8F93\u5165\u9519\u8BEF" 177 | --- !u!114 &114163237207758554 178 | MonoBehaviour: 179 | m_ObjectHideFlags: 1 180 | m_PrefabParentObject: {fileID: 0} 181 | m_PrefabInternal: {fileID: 100100000} 182 | m_GameObject: {fileID: 1475971210066786} 183 | m_Enabled: 1 184 | m_EditorHideFlags: 0 185 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 186 | m_Name: 187 | m_EditorClassIdentifier: 188 | m_Material: {fileID: 0} 189 | m_Color: {r: 0.97794116, g: 0.97794116, b: 0.97794116, a: 1} 190 | m_RaycastTarget: 1 191 | m_OnCullStateChanged: 192 | m_PersistentCalls: 193 | m_Calls: [] 194 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 195 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 196 | m_FontData: 197 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 198 | m_FontSize: 28 199 | m_FontStyle: 0 200 | m_BestFit: 0 201 | m_MinSize: 2 202 | m_MaxSize: 40 203 | m_Alignment: 0 204 | m_AlignByGeometry: 0 205 | m_RichText: 1 206 | m_HorizontalOverflow: 0 207 | m_VerticalOverflow: 0 208 | m_LineSpacing: 1 209 | m_Text: "\u63D0 \u793A" 210 | --- !u!114 &114498261527715652 211 | MonoBehaviour: 212 | m_ObjectHideFlags: 1 213 | m_PrefabParentObject: {fileID: 0} 214 | m_PrefabInternal: {fileID: 100100000} 215 | m_GameObject: {fileID: 1323328217397886} 216 | m_Enabled: 1 217 | m_EditorHideFlags: 0 218 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 219 | m_Name: 220 | m_EditorClassIdentifier: 221 | m_Material: {fileID: 0} 222 | m_Color: {r: 0.77205884, g: 0.77205884, b: 0.77205884, a: 1} 223 | m_RaycastTarget: 1 224 | m_OnCullStateChanged: 225 | m_PersistentCalls: 226 | m_Calls: [] 227 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 228 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 229 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 230 | m_Type: 1 231 | m_PreserveAspect: 0 232 | m_FillCenter: 1 233 | m_FillMethod: 4 234 | m_FillAmount: 1 235 | m_FillClockwise: 1 236 | m_FillOrigin: 0 237 | --- !u!114 &114589197135618856 238 | MonoBehaviour: 239 | m_ObjectHideFlags: 1 240 | m_PrefabParentObject: {fileID: 0} 241 | m_PrefabInternal: {fileID: 100100000} 242 | m_GameObject: {fileID: 1459481734709870} 243 | m_Enabled: 1 244 | m_EditorHideFlags: 0 245 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 246 | m_Name: 247 | m_EditorClassIdentifier: 248 | m_Material: {fileID: 0} 249 | m_Color: {r: 0.1102941, g: 0.1102941, b: 0.1102941, a: 0.51} 250 | m_RaycastTarget: 1 251 | m_OnCullStateChanged: 252 | m_PersistentCalls: 253 | m_Calls: [] 254 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 255 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 256 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 257 | m_Type: 1 258 | m_PreserveAspect: 0 259 | m_FillCenter: 1 260 | m_FillMethod: 4 261 | m_FillAmount: 1 262 | m_FillClockwise: 1 263 | m_FillOrigin: 0 264 | --- !u!114 &114904046682528420 265 | MonoBehaviour: 266 | m_ObjectHideFlags: 1 267 | m_PrefabParentObject: {fileID: 0} 268 | m_PrefabInternal: {fileID: 100100000} 269 | m_GameObject: {fileID: 1363547213689662} 270 | m_Enabled: 1 271 | m_EditorHideFlags: 0 272 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 273 | m_Name: 274 | m_EditorClassIdentifier: 275 | m_Material: {fileID: 0} 276 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 277 | m_RaycastTarget: 1 278 | m_OnCullStateChanged: 279 | m_PersistentCalls: 280 | m_Calls: [] 281 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 282 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 283 | m_FontData: 284 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 285 | m_FontSize: 28 286 | m_FontStyle: 0 287 | m_BestFit: 0 288 | m_MinSize: 2 289 | m_MaxSize: 40 290 | m_Alignment: 4 291 | m_AlignByGeometry: 0 292 | m_RichText: 1 293 | m_HorizontalOverflow: 0 294 | m_VerticalOverflow: 0 295 | m_LineSpacing: 1 296 | m_Text: "\u77E5 \u9053 \u4E86" 297 | --- !u!114 &114920634000773172 298 | MonoBehaviour: 299 | m_ObjectHideFlags: 1 300 | m_PrefabParentObject: {fileID: 0} 301 | m_PrefabInternal: {fileID: 100100000} 302 | m_GameObject: {fileID: 1323328217397886} 303 | m_Enabled: 1 304 | m_EditorHideFlags: 0 305 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 306 | m_Name: 307 | m_EditorClassIdentifier: 308 | m_Navigation: 309 | m_Mode: 3 310 | m_SelectOnUp: {fileID: 0} 311 | m_SelectOnDown: {fileID: 0} 312 | m_SelectOnLeft: {fileID: 0} 313 | m_SelectOnRight: {fileID: 0} 314 | m_Transition: 1 315 | m_Colors: 316 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 317 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 318 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 319 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 320 | m_ColorMultiplier: 1 321 | m_FadeDuration: 0.1 322 | m_SpriteState: 323 | m_HighlightedSprite: {fileID: 0} 324 | m_PressedSprite: {fileID: 0} 325 | m_DisabledSprite: {fileID: 0} 326 | m_AnimationTriggers: 327 | m_NormalTrigger: Normal 328 | m_HighlightedTrigger: Highlighted 329 | m_PressedTrigger: Pressed 330 | m_DisabledTrigger: Disabled 331 | m_Interactable: 1 332 | m_TargetGraphic: {fileID: 114498261527715652} 333 | m_OnClick: 334 | m_PersistentCalls: 335 | m_Calls: [] 336 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 337 | Culture=neutral, PublicKeyToken=null 338 | --- !u!222 &222085269385939038 339 | CanvasRenderer: 340 | m_ObjectHideFlags: 1 341 | m_PrefabParentObject: {fileID: 0} 342 | m_PrefabInternal: {fileID: 100100000} 343 | m_GameObject: {fileID: 1363547213689662} 344 | --- !u!222 &222193726845816144 345 | CanvasRenderer: 346 | m_ObjectHideFlags: 1 347 | m_PrefabParentObject: {fileID: 0} 348 | m_PrefabInternal: {fileID: 100100000} 349 | m_GameObject: {fileID: 1459481734709870} 350 | --- !u!222 &222661215438390578 351 | CanvasRenderer: 352 | m_ObjectHideFlags: 1 353 | m_PrefabParentObject: {fileID: 0} 354 | m_PrefabInternal: {fileID: 100100000} 355 | m_GameObject: {fileID: 1475971210066786} 356 | --- !u!222 &222869439357253394 357 | CanvasRenderer: 358 | m_ObjectHideFlags: 1 359 | m_PrefabParentObject: {fileID: 0} 360 | m_PrefabInternal: {fileID: 100100000} 361 | m_GameObject: {fileID: 1012316364714090} 362 | --- !u!222 &222987668177107176 363 | CanvasRenderer: 364 | m_ObjectHideFlags: 1 365 | m_PrefabParentObject: {fileID: 0} 366 | m_PrefabInternal: {fileID: 100100000} 367 | m_GameObject: {fileID: 1073526749823662} 368 | --- !u!222 &222989370733023962 369 | CanvasRenderer: 370 | m_ObjectHideFlags: 1 371 | m_PrefabParentObject: {fileID: 0} 372 | m_PrefabInternal: {fileID: 100100000} 373 | m_GameObject: {fileID: 1323328217397886} 374 | --- !u!224 &224026598352648068 375 | RectTransform: 376 | m_ObjectHideFlags: 1 377 | m_PrefabParentObject: {fileID: 0} 378 | m_PrefabInternal: {fileID: 100100000} 379 | m_GameObject: {fileID: 1459481734709870} 380 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 381 | m_LocalPosition: {x: 1, y: -4, z: 0} 382 | m_LocalScale: {x: 1, y: 1, z: 1} 383 | m_Children: 384 | - {fileID: 224746492422744312} 385 | - {fileID: 224328884413908618} 386 | - {fileID: 224324640082868626} 387 | m_Father: {fileID: 0} 388 | m_RootOrder: 0 389 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 390 | m_AnchorMin: {x: 0, y: 0} 391 | m_AnchorMax: {x: 1, y: 1} 392 | m_AnchoredPosition: {x: 1, y: -4} 393 | m_SizeDelta: {x: 34, y: 39} 394 | m_Pivot: {x: 0.5, y: 0.5} 395 | --- !u!224 &224324640082868626 396 | RectTransform: 397 | m_ObjectHideFlags: 1 398 | m_PrefabParentObject: {fileID: 0} 399 | m_PrefabInternal: {fileID: 100100000} 400 | m_GameObject: {fileID: 1323328217397886} 401 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 402 | m_LocalPosition: {x: 0, y: -125, z: 0} 403 | m_LocalScale: {x: 1, y: 1, z: 1} 404 | m_Children: 405 | - {fileID: 224428006683731742} 406 | m_Father: {fileID: 224026598352648068} 407 | m_RootOrder: 2 408 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 409 | m_AnchorMin: {x: 0.5, y: 0.5} 410 | m_AnchorMax: {x: 0.5, y: 0.5} 411 | m_AnchoredPosition: {x: 0, y: -125} 412 | m_SizeDelta: {x: 200, y: 60} 413 | m_Pivot: {x: 0.5, y: 0.5} 414 | --- !u!224 &224328884413908618 415 | RectTransform: 416 | m_ObjectHideFlags: 1 417 | m_PrefabParentObject: {fileID: 0} 418 | m_PrefabInternal: {fileID: 100100000} 419 | m_GameObject: {fileID: 1073526749823662} 420 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 421 | m_LocalPosition: {x: 13, y: -15, z: 0} 422 | m_LocalScale: {x: 1, y: 1, z: 1} 423 | m_Children: [] 424 | m_Father: {fileID: 224026598352648068} 425 | m_RootOrder: 1 426 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 427 | m_AnchorMin: {x: 0.5, y: 0.5} 428 | m_AnchorMax: {x: 0.5, y: 0.5} 429 | m_AnchoredPosition: {x: 13, y: -15} 430 | m_SizeDelta: {x: 380, y: 100} 431 | m_Pivot: {x: 0.5, y: 0.5} 432 | --- !u!224 &224428006683731742 433 | RectTransform: 434 | m_ObjectHideFlags: 1 435 | m_PrefabParentObject: {fileID: 0} 436 | m_PrefabInternal: {fileID: 100100000} 437 | m_GameObject: {fileID: 1363547213689662} 438 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 439 | m_LocalPosition: {x: 0, y: 0, z: 0} 440 | m_LocalScale: {x: 1, y: 1, z: 1} 441 | m_Children: [] 442 | m_Father: {fileID: 224324640082868626} 443 | m_RootOrder: 0 444 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 445 | m_AnchorMin: {x: 0, y: 0} 446 | m_AnchorMax: {x: 1, y: 1} 447 | m_AnchoredPosition: {x: 0, y: 0} 448 | m_SizeDelta: {x: 0, y: 0} 449 | m_Pivot: {x: 0.5, y: 0.5} 450 | --- !u!224 &224469625183292594 451 | RectTransform: 452 | m_ObjectHideFlags: 1 453 | m_PrefabParentObject: {fileID: 0} 454 | m_PrefabInternal: {fileID: 100100000} 455 | m_GameObject: {fileID: 1475971210066786} 456 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 457 | m_LocalPosition: {x: -140, y: 115, z: 0} 458 | m_LocalScale: {x: 1, y: 1, z: 1} 459 | m_Children: [] 460 | m_Father: {fileID: 224746492422744312} 461 | m_RootOrder: 0 462 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 463 | m_AnchorMin: {x: 0.5, y: 0.5} 464 | m_AnchorMax: {x: 0.5, y: 0.5} 465 | m_AnchoredPosition: {x: -140, y: 115} 466 | m_SizeDelta: {x: 160, y: 60} 467 | m_Pivot: {x: 0.5, y: 0.5} 468 | --- !u!224 &224746492422744312 469 | RectTransform: 470 | m_ObjectHideFlags: 1 471 | m_PrefabParentObject: {fileID: 0} 472 | m_PrefabInternal: {fileID: 100100000} 473 | m_GameObject: {fileID: 1012316364714090} 474 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 475 | m_LocalPosition: {x: 13, y: -32, z: 0} 476 | m_LocalScale: {x: 1, y: 1, z: 1} 477 | m_Children: 478 | - {fileID: 224469625183292594} 479 | m_Father: {fileID: 224026598352648068} 480 | m_RootOrder: 0 481 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 482 | m_AnchorMin: {x: 0.5, y: 0.5} 483 | m_AnchorMax: {x: 0.5, y: 0.5} 484 | m_AnchoredPosition: {x: 13, y: -32} 485 | m_SizeDelta: {x: 480, y: 300} 486 | m_Pivot: {x: 0.5, y: 0.5} 487 | -------------------------------------------------------------------------------- /Assets/UI/Resources/AlertPanel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47bf3bef1861388409444c27f18cf388 3 | timeCreated: 1510914421 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UI/Resources/LobbyPanel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5e25423b6f620a4699cb937e390553d 3 | timeCreated: 1510929334 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UI/Resources/LoginPanel.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1457528175168374} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1141042578045034 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 224571646277269068} 22 | - component: {fileID: 222411604821152150} 23 | - component: {fileID: 114141000006660492} 24 | m_Layer: 5 25 | m_Name: IDText 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1184155270688558 32 | GameObject: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 5 37 | m_Component: 38 | - component: {fileID: 224320143488024776} 39 | - component: {fileID: 222536902397392982} 40 | - component: {fileID: 114629368320599422} 41 | m_Layer: 5 42 | m_Name: Placeholder 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!1 &1234947355654648 49 | GameObject: 50 | m_ObjectHideFlags: 0 51 | m_PrefabParentObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | serializedVersion: 5 54 | m_Component: 55 | - component: {fileID: 224325966545253898} 56 | - component: {fileID: 222832259542413104} 57 | - component: {fileID: 114026836944833972} 58 | - component: {fileID: 114923784797720716} 59 | m_Layer: 5 60 | m_Name: LoginBtn 61 | m_TagString: Untagged 62 | m_Icon: {fileID: 0} 63 | m_NavMeshLayer: 0 64 | m_StaticEditorFlags: 0 65 | m_IsActive: 1 66 | --- !u!1 &1356182944788444 67 | GameObject: 68 | m_ObjectHideFlags: 0 69 | m_PrefabParentObject: {fileID: 0} 70 | m_PrefabInternal: {fileID: 100100000} 71 | serializedVersion: 5 72 | m_Component: 73 | - component: {fileID: 224946429225115044} 74 | - component: {fileID: 222084203864529276} 75 | - component: {fileID: 114007911242122570} 76 | m_Layer: 5 77 | m_Name: PWText 78 | m_TagString: Untagged 79 | m_Icon: {fileID: 0} 80 | m_NavMeshLayer: 0 81 | m_StaticEditorFlags: 0 82 | m_IsActive: 1 83 | --- !u!1 &1457528175168374 84 | GameObject: 85 | m_ObjectHideFlags: 0 86 | m_PrefabParentObject: {fileID: 0} 87 | m_PrefabInternal: {fileID: 100100000} 88 | serializedVersion: 5 89 | m_Component: 90 | - component: {fileID: 224122897384252638} 91 | - component: {fileID: 222276794380848332} 92 | - component: {fileID: 114668106547342778} 93 | m_Layer: 5 94 | m_Name: LoginPanel 95 | m_TagString: Untagged 96 | m_Icon: {fileID: 0} 97 | m_NavMeshLayer: 0 98 | m_StaticEditorFlags: 0 99 | m_IsActive: 1 100 | --- !u!1 &1591811641266898 101 | GameObject: 102 | m_ObjectHideFlags: 0 103 | m_PrefabParentObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | serializedVersion: 5 106 | m_Component: 107 | - component: {fileID: 224623994513772056} 108 | - component: {fileID: 222950798765368374} 109 | - component: {fileID: 114558234564194344} 110 | - component: {fileID: 114299117299781166} 111 | m_Layer: 5 112 | m_Name: PWInput 113 | m_TagString: Untagged 114 | m_Icon: {fileID: 0} 115 | m_NavMeshLayer: 0 116 | m_StaticEditorFlags: 0 117 | m_IsActive: 1 118 | --- !u!1 &1714863424584718 119 | GameObject: 120 | m_ObjectHideFlags: 1 121 | m_PrefabParentObject: {fileID: 0} 122 | m_PrefabInternal: {fileID: 100100000} 123 | serializedVersion: 5 124 | m_Component: 125 | - component: {fileID: 224823570185977958} 126 | - component: {fileID: 222624718743045994} 127 | - component: {fileID: 114611223731839938} 128 | m_Layer: 5 129 | m_Name: Text 130 | m_TagString: Untagged 131 | m_Icon: {fileID: 0} 132 | m_NavMeshLayer: 0 133 | m_StaticEditorFlags: 0 134 | m_IsActive: 1 135 | --- !u!1 &1764506732297512 136 | GameObject: 137 | m_ObjectHideFlags: 1 138 | m_PrefabParentObject: {fileID: 0} 139 | m_PrefabInternal: {fileID: 100100000} 140 | serializedVersion: 5 141 | m_Component: 142 | - component: {fileID: 224720569909193246} 143 | - component: {fileID: 222380023093948856} 144 | - component: {fileID: 114216119092177002} 145 | m_Layer: 5 146 | m_Name: Placeholder 147 | m_TagString: Untagged 148 | m_Icon: {fileID: 0} 149 | m_NavMeshLayer: 0 150 | m_StaticEditorFlags: 0 151 | m_IsActive: 1 152 | --- !u!1 &1766212973029120 153 | GameObject: 154 | m_ObjectHideFlags: 1 155 | m_PrefabParentObject: {fileID: 0} 156 | m_PrefabInternal: {fileID: 100100000} 157 | serializedVersion: 5 158 | m_Component: 159 | - component: {fileID: 224224052963740628} 160 | - component: {fileID: 222598074906767294} 161 | - component: {fileID: 114451712768087216} 162 | m_Layer: 5 163 | m_Name: Text 164 | m_TagString: Untagged 165 | m_Icon: {fileID: 0} 166 | m_NavMeshLayer: 0 167 | m_StaticEditorFlags: 0 168 | m_IsActive: 1 169 | --- !u!1 &1772222688677354 170 | GameObject: 171 | m_ObjectHideFlags: 1 172 | m_PrefabParentObject: {fileID: 0} 173 | m_PrefabInternal: {fileID: 100100000} 174 | serializedVersion: 5 175 | m_Component: 176 | - component: {fileID: 224845719236950640} 177 | - component: {fileID: 222918929993229090} 178 | - component: {fileID: 114103902235657474} 179 | m_Layer: 5 180 | m_Name: Text 181 | m_TagString: Untagged 182 | m_Icon: {fileID: 0} 183 | m_NavMeshLayer: 0 184 | m_StaticEditorFlags: 0 185 | m_IsActive: 1 186 | --- !u!1 &1805875822041888 187 | GameObject: 188 | m_ObjectHideFlags: 1 189 | m_PrefabParentObject: {fileID: 0} 190 | m_PrefabInternal: {fileID: 100100000} 191 | serializedVersion: 5 192 | m_Component: 193 | - component: {fileID: 224304487975737566} 194 | - component: {fileID: 222946717898829020} 195 | - component: {fileID: 114012562899377364} 196 | m_Layer: 5 197 | m_Name: Text 198 | m_TagString: Untagged 199 | m_Icon: {fileID: 0} 200 | m_NavMeshLayer: 0 201 | m_StaticEditorFlags: 0 202 | m_IsActive: 1 203 | --- !u!1 &1825914912058214 204 | GameObject: 205 | m_ObjectHideFlags: 0 206 | m_PrefabParentObject: {fileID: 0} 207 | m_PrefabInternal: {fileID: 100100000} 208 | serializedVersion: 5 209 | m_Component: 210 | - component: {fileID: 224830882199670636} 211 | - component: {fileID: 222988711603853768} 212 | - component: {fileID: 114957224132131578} 213 | - component: {fileID: 114276498958307742} 214 | m_Layer: 5 215 | m_Name: IDInput 216 | m_TagString: Untagged 217 | m_Icon: {fileID: 0} 218 | m_NavMeshLayer: 0 219 | m_StaticEditorFlags: 0 220 | m_IsActive: 1 221 | --- !u!1 &1838920160049762 222 | GameObject: 223 | m_ObjectHideFlags: 0 224 | m_PrefabParentObject: {fileID: 0} 225 | m_PrefabInternal: {fileID: 100100000} 226 | serializedVersion: 5 227 | m_Component: 228 | - component: {fileID: 224276821921085590} 229 | - component: {fileID: 222773618903275896} 230 | - component: {fileID: 114914294799224936} 231 | m_Layer: 5 232 | m_Name: BgImage 233 | m_TagString: Untagged 234 | m_Icon: {fileID: 0} 235 | m_NavMeshLayer: 0 236 | m_StaticEditorFlags: 0 237 | m_IsActive: 1 238 | --- !u!1 &1889019528067202 239 | GameObject: 240 | m_ObjectHideFlags: 0 241 | m_PrefabParentObject: {fileID: 0} 242 | m_PrefabInternal: {fileID: 100100000} 243 | serializedVersion: 5 244 | m_Component: 245 | - component: {fileID: 224100596063711994} 246 | - component: {fileID: 222660928549319476} 247 | - component: {fileID: 114818944812621636} 248 | - component: {fileID: 114373803251400150} 249 | m_Layer: 5 250 | m_Name: RegisterBtn 251 | m_TagString: Untagged 252 | m_Icon: {fileID: 0} 253 | m_NavMeshLayer: 0 254 | m_StaticEditorFlags: 0 255 | m_IsActive: 1 256 | --- !u!114 &114007911242122570 257 | MonoBehaviour: 258 | m_ObjectHideFlags: 1 259 | m_PrefabParentObject: {fileID: 0} 260 | m_PrefabInternal: {fileID: 100100000} 261 | m_GameObject: {fileID: 1356182944788444} 262 | m_Enabled: 1 263 | m_EditorHideFlags: 0 264 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 265 | m_Name: 266 | m_EditorClassIdentifier: 267 | m_Material: {fileID: 0} 268 | m_Color: {r: 1, g: 1, b: 1, a: 1} 269 | m_RaycastTarget: 1 270 | m_OnCullStateChanged: 271 | m_PersistentCalls: 272 | m_Calls: [] 273 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 274 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 275 | m_FontData: 276 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 277 | m_FontSize: 28 278 | m_FontStyle: 0 279 | m_BestFit: 0 280 | m_MinSize: 2 281 | m_MaxSize: 40 282 | m_Alignment: 3 283 | m_AlignByGeometry: 0 284 | m_RichText: 1 285 | m_HorizontalOverflow: 0 286 | m_VerticalOverflow: 0 287 | m_LineSpacing: 1 288 | m_Text: "\u5BC6 \u7801" 289 | --- !u!114 &114012562899377364 290 | MonoBehaviour: 291 | m_ObjectHideFlags: 1 292 | m_PrefabParentObject: {fileID: 0} 293 | m_PrefabInternal: {fileID: 100100000} 294 | m_GameObject: {fileID: 1805875822041888} 295 | m_Enabled: 1 296 | m_EditorHideFlags: 0 297 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 298 | m_Name: 299 | m_EditorClassIdentifier: 300 | m_Material: {fileID: 0} 301 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 302 | m_RaycastTarget: 1 303 | m_OnCullStateChanged: 304 | m_PersistentCalls: 305 | m_Calls: [] 306 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 307 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 308 | m_FontData: 309 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 310 | m_FontSize: 30 311 | m_FontStyle: 0 312 | m_BestFit: 0 313 | m_MinSize: 2 314 | m_MaxSize: 40 315 | m_Alignment: 3 316 | m_AlignByGeometry: 0 317 | m_RichText: 0 318 | m_HorizontalOverflow: 1 319 | m_VerticalOverflow: 0 320 | m_LineSpacing: 1 321 | m_Text: abc 322 | --- !u!114 &114026836944833972 323 | MonoBehaviour: 324 | m_ObjectHideFlags: 1 325 | m_PrefabParentObject: {fileID: 0} 326 | m_PrefabInternal: {fileID: 100100000} 327 | m_GameObject: {fileID: 1234947355654648} 328 | m_Enabled: 1 329 | m_EditorHideFlags: 0 330 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 331 | m_Name: 332 | m_EditorClassIdentifier: 333 | m_Material: {fileID: 0} 334 | m_Color: {r: 0.375, g: 0, b: 0, a: 1} 335 | m_RaycastTarget: 1 336 | m_OnCullStateChanged: 337 | m_PersistentCalls: 338 | m_Calls: [] 339 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 340 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 341 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 342 | m_Type: 1 343 | m_PreserveAspect: 0 344 | m_FillCenter: 1 345 | m_FillMethod: 4 346 | m_FillAmount: 1 347 | m_FillClockwise: 1 348 | m_FillOrigin: 0 349 | --- !u!114 &114103902235657474 350 | MonoBehaviour: 351 | m_ObjectHideFlags: 1 352 | m_PrefabParentObject: {fileID: 0} 353 | m_PrefabInternal: {fileID: 100100000} 354 | m_GameObject: {fileID: 1772222688677354} 355 | m_Enabled: 1 356 | m_EditorHideFlags: 0 357 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 358 | m_Name: 359 | m_EditorClassIdentifier: 360 | m_Material: {fileID: 0} 361 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 362 | m_RaycastTarget: 1 363 | m_OnCullStateChanged: 364 | m_PersistentCalls: 365 | m_Calls: [] 366 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 367 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 368 | m_FontData: 369 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 370 | m_FontSize: 30 371 | m_FontStyle: 0 372 | m_BestFit: 0 373 | m_MinSize: 2 374 | m_MaxSize: 40 375 | m_Alignment: 3 376 | m_AlignByGeometry: 0 377 | m_RichText: 0 378 | m_HorizontalOverflow: 1 379 | m_VerticalOverflow: 0 380 | m_LineSpacing: 1 381 | m_Text: '***' 382 | --- !u!114 &114141000006660492 383 | MonoBehaviour: 384 | m_ObjectHideFlags: 1 385 | m_PrefabParentObject: {fileID: 0} 386 | m_PrefabInternal: {fileID: 100100000} 387 | m_GameObject: {fileID: 1141042578045034} 388 | m_Enabled: 1 389 | m_EditorHideFlags: 0 390 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 391 | m_Name: 392 | m_EditorClassIdentifier: 393 | m_Material: {fileID: 0} 394 | m_Color: {r: 1, g: 1, b: 1, a: 1} 395 | m_RaycastTarget: 1 396 | m_OnCullStateChanged: 397 | m_PersistentCalls: 398 | m_Calls: [] 399 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 400 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 401 | m_FontData: 402 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 403 | m_FontSize: 28 404 | m_FontStyle: 0 405 | m_BestFit: 0 406 | m_MinSize: 2 407 | m_MaxSize: 40 408 | m_Alignment: 3 409 | m_AlignByGeometry: 0 410 | m_RichText: 1 411 | m_HorizontalOverflow: 0 412 | m_VerticalOverflow: 0 413 | m_LineSpacing: 1 414 | m_Text: "\u7528 \u6237 \u540D" 415 | --- !u!114 &114216119092177002 416 | MonoBehaviour: 417 | m_ObjectHideFlags: 1 418 | m_PrefabParentObject: {fileID: 0} 419 | m_PrefabInternal: {fileID: 100100000} 420 | m_GameObject: {fileID: 1764506732297512} 421 | m_Enabled: 0 422 | m_EditorHideFlags: 0 423 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 424 | m_Name: 425 | m_EditorClassIdentifier: 426 | m_Material: {fileID: 0} 427 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} 428 | m_RaycastTarget: 1 429 | m_OnCullStateChanged: 430 | m_PersistentCalls: 431 | m_Calls: [] 432 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 433 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 434 | m_FontData: 435 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 436 | m_FontSize: 28 437 | m_FontStyle: 2 438 | m_BestFit: 0 439 | m_MinSize: 2 440 | m_MaxSize: 40 441 | m_Alignment: 3 442 | m_AlignByGeometry: 0 443 | m_RichText: 1 444 | m_HorizontalOverflow: 0 445 | m_VerticalOverflow: 0 446 | m_LineSpacing: 1 447 | m_Text: Enter Password... 448 | --- !u!114 &114276498958307742 449 | MonoBehaviour: 450 | m_ObjectHideFlags: 1 451 | m_PrefabParentObject: {fileID: 0} 452 | m_PrefabInternal: {fileID: 100100000} 453 | m_GameObject: {fileID: 1825914912058214} 454 | m_Enabled: 1 455 | m_EditorHideFlags: 0 456 | m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 457 | m_Name: 458 | m_EditorClassIdentifier: 459 | m_Navigation: 460 | m_Mode: 3 461 | m_SelectOnUp: {fileID: 0} 462 | m_SelectOnDown: {fileID: 0} 463 | m_SelectOnLeft: {fileID: 0} 464 | m_SelectOnRight: {fileID: 0} 465 | m_Transition: 1 466 | m_Colors: 467 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 468 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 469 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 470 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 471 | m_ColorMultiplier: 1 472 | m_FadeDuration: 0.1 473 | m_SpriteState: 474 | m_HighlightedSprite: {fileID: 0} 475 | m_PressedSprite: {fileID: 0} 476 | m_DisabledSprite: {fileID: 0} 477 | m_AnimationTriggers: 478 | m_NormalTrigger: Normal 479 | m_HighlightedTrigger: Highlighted 480 | m_PressedTrigger: Pressed 481 | m_DisabledTrigger: Disabled 482 | m_Interactable: 1 483 | m_TargetGraphic: {fileID: 114957224132131578} 484 | m_TextComponent: {fileID: 114012562899377364} 485 | m_Placeholder: {fileID: 114629368320599422} 486 | m_ContentType: 0 487 | m_InputType: 0 488 | m_AsteriskChar: 42 489 | m_KeyboardType: 0 490 | m_LineType: 0 491 | m_HideMobileInput: 0 492 | m_CharacterValidation: 0 493 | m_CharacterLimit: 0 494 | m_OnEndEdit: 495 | m_PersistentCalls: 496 | m_Calls: [] 497 | m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, 498 | Culture=neutral, PublicKeyToken=null 499 | m_OnValueChanged: 500 | m_PersistentCalls: 501 | m_Calls: [] 502 | m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, 503 | Culture=neutral, PublicKeyToken=null 504 | m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 505 | m_CustomCaretColor: 0 506 | m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} 507 | m_Text: abc 508 | m_CaretBlinkRate: 0.85 509 | m_CaretWidth: 1 510 | m_ReadOnly: 0 511 | --- !u!114 &114299117299781166 512 | MonoBehaviour: 513 | m_ObjectHideFlags: 1 514 | m_PrefabParentObject: {fileID: 0} 515 | m_PrefabInternal: {fileID: 100100000} 516 | m_GameObject: {fileID: 1591811641266898} 517 | m_Enabled: 1 518 | m_EditorHideFlags: 0 519 | m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 520 | m_Name: 521 | m_EditorClassIdentifier: 522 | m_Navigation: 523 | m_Mode: 3 524 | m_SelectOnUp: {fileID: 0} 525 | m_SelectOnDown: {fileID: 0} 526 | m_SelectOnLeft: {fileID: 0} 527 | m_SelectOnRight: {fileID: 0} 528 | m_Transition: 1 529 | m_Colors: 530 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 531 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 532 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 533 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 534 | m_ColorMultiplier: 1 535 | m_FadeDuration: 0.1 536 | m_SpriteState: 537 | m_HighlightedSprite: {fileID: 0} 538 | m_PressedSprite: {fileID: 0} 539 | m_DisabledSprite: {fileID: 0} 540 | m_AnimationTriggers: 541 | m_NormalTrigger: Normal 542 | m_HighlightedTrigger: Highlighted 543 | m_PressedTrigger: Pressed 544 | m_DisabledTrigger: Disabled 545 | m_Interactable: 1 546 | m_TargetGraphic: {fileID: 114558234564194344} 547 | m_TextComponent: {fileID: 114103902235657474} 548 | m_Placeholder: {fileID: 114216119092177002} 549 | m_ContentType: 7 550 | m_InputType: 2 551 | m_AsteriskChar: 42 552 | m_KeyboardType: 0 553 | m_LineType: 0 554 | m_HideMobileInput: 0 555 | m_CharacterValidation: 0 556 | m_CharacterLimit: 0 557 | m_OnEndEdit: 558 | m_PersistentCalls: 559 | m_Calls: [] 560 | m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, 561 | Culture=neutral, PublicKeyToken=null 562 | m_OnValueChanged: 563 | m_PersistentCalls: 564 | m_Calls: [] 565 | m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, 566 | Culture=neutral, PublicKeyToken=null 567 | m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 568 | m_CustomCaretColor: 0 569 | m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} 570 | m_Text: 123 571 | m_CaretBlinkRate: 0.85 572 | m_CaretWidth: 1 573 | m_ReadOnly: 0 574 | --- !u!114 &114373803251400150 575 | MonoBehaviour: 576 | m_ObjectHideFlags: 1 577 | m_PrefabParentObject: {fileID: 0} 578 | m_PrefabInternal: {fileID: 100100000} 579 | m_GameObject: {fileID: 1889019528067202} 580 | m_Enabled: 1 581 | m_EditorHideFlags: 0 582 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 583 | m_Name: 584 | m_EditorClassIdentifier: 585 | m_Navigation: 586 | m_Mode: 3 587 | m_SelectOnUp: {fileID: 0} 588 | m_SelectOnDown: {fileID: 0} 589 | m_SelectOnLeft: {fileID: 0} 590 | m_SelectOnRight: {fileID: 0} 591 | m_Transition: 1 592 | m_Colors: 593 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 594 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 595 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 596 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 597 | m_ColorMultiplier: 1 598 | m_FadeDuration: 0.1 599 | m_SpriteState: 600 | m_HighlightedSprite: {fileID: 0} 601 | m_PressedSprite: {fileID: 0} 602 | m_DisabledSprite: {fileID: 0} 603 | m_AnimationTriggers: 604 | m_NormalTrigger: Normal 605 | m_HighlightedTrigger: Highlighted 606 | m_PressedTrigger: Pressed 607 | m_DisabledTrigger: Disabled 608 | m_Interactable: 1 609 | m_TargetGraphic: {fileID: 114818944812621636} 610 | m_OnClick: 611 | m_PersistentCalls: 612 | m_Calls: [] 613 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 614 | Culture=neutral, PublicKeyToken=null 615 | --- !u!114 &114451712768087216 616 | MonoBehaviour: 617 | m_ObjectHideFlags: 1 618 | m_PrefabParentObject: {fileID: 0} 619 | m_PrefabInternal: {fileID: 100100000} 620 | m_GameObject: {fileID: 1766212973029120} 621 | m_Enabled: 1 622 | m_EditorHideFlags: 0 623 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 624 | m_Name: 625 | m_EditorClassIdentifier: 626 | m_Material: {fileID: 0} 627 | m_Color: {r: 1, g: 1, b: 1, a: 1} 628 | m_RaycastTarget: 1 629 | m_OnCullStateChanged: 630 | m_PersistentCalls: 631 | m_Calls: [] 632 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 633 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 634 | m_FontData: 635 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 636 | m_FontSize: 28 637 | m_FontStyle: 0 638 | m_BestFit: 0 639 | m_MinSize: 2 640 | m_MaxSize: 40 641 | m_Alignment: 4 642 | m_AlignByGeometry: 0 643 | m_RichText: 1 644 | m_HorizontalOverflow: 0 645 | m_VerticalOverflow: 0 646 | m_LineSpacing: 1 647 | m_Text: "\u767B \u5F55" 648 | --- !u!114 &114558234564194344 649 | MonoBehaviour: 650 | m_ObjectHideFlags: 1 651 | m_PrefabParentObject: {fileID: 0} 652 | m_PrefabInternal: {fileID: 100100000} 653 | m_GameObject: {fileID: 1591811641266898} 654 | m_Enabled: 1 655 | m_EditorHideFlags: 0 656 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 657 | m_Name: 658 | m_EditorClassIdentifier: 659 | m_Material: {fileID: 0} 660 | m_Color: {r: 1, g: 1, b: 1, a: 1} 661 | m_RaycastTarget: 1 662 | m_OnCullStateChanged: 663 | m_PersistentCalls: 664 | m_Calls: [] 665 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 666 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 667 | m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} 668 | m_Type: 1 669 | m_PreserveAspect: 0 670 | m_FillCenter: 1 671 | m_FillMethod: 4 672 | m_FillAmount: 1 673 | m_FillClockwise: 1 674 | m_FillOrigin: 0 675 | --- !u!114 &114611223731839938 676 | MonoBehaviour: 677 | m_ObjectHideFlags: 1 678 | m_PrefabParentObject: {fileID: 0} 679 | m_PrefabInternal: {fileID: 100100000} 680 | m_GameObject: {fileID: 1714863424584718} 681 | m_Enabled: 1 682 | m_EditorHideFlags: 0 683 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 684 | m_Name: 685 | m_EditorClassIdentifier: 686 | m_Material: {fileID: 0} 687 | m_Color: {r: 0.6691177, g: 0.6691177, b: 0.6691177, a: 1} 688 | m_RaycastTarget: 1 689 | m_OnCullStateChanged: 690 | m_PersistentCalls: 691 | m_Calls: [] 692 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 693 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 694 | m_FontData: 695 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 696 | m_FontSize: 28 697 | m_FontStyle: 0 698 | m_BestFit: 0 699 | m_MinSize: 2 700 | m_MaxSize: 40 701 | m_Alignment: 4 702 | m_AlignByGeometry: 0 703 | m_RichText: 1 704 | m_HorizontalOverflow: 0 705 | m_VerticalOverflow: 0 706 | m_LineSpacing: 1 707 | m_Text: "\u6CE8 \u518C" 708 | --- !u!114 &114629368320599422 709 | MonoBehaviour: 710 | m_ObjectHideFlags: 1 711 | m_PrefabParentObject: {fileID: 0} 712 | m_PrefabInternal: {fileID: 100100000} 713 | m_GameObject: {fileID: 1184155270688558} 714 | m_Enabled: 0 715 | m_EditorHideFlags: 0 716 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 717 | m_Name: 718 | m_EditorClassIdentifier: 719 | m_Material: {fileID: 0} 720 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} 721 | m_RaycastTarget: 1 722 | m_OnCullStateChanged: 723 | m_PersistentCalls: 724 | m_Calls: [] 725 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 726 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 727 | m_FontData: 728 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 729 | m_FontSize: 28 730 | m_FontStyle: 2 731 | m_BestFit: 0 732 | m_MinSize: 2 733 | m_MaxSize: 40 734 | m_Alignment: 3 735 | m_AlignByGeometry: 0 736 | m_RichText: 1 737 | m_HorizontalOverflow: 0 738 | m_VerticalOverflow: 0 739 | m_LineSpacing: 1 740 | m_Text: Enter Username... 741 | --- !u!114 &114668106547342778 742 | MonoBehaviour: 743 | m_ObjectHideFlags: 1 744 | m_PrefabParentObject: {fileID: 0} 745 | m_PrefabInternal: {fileID: 100100000} 746 | m_GameObject: {fileID: 1457528175168374} 747 | m_Enabled: 1 748 | m_EditorHideFlags: 0 749 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 750 | m_Name: 751 | m_EditorClassIdentifier: 752 | m_Material: {fileID: 0} 753 | m_Color: {r: 0, g: 0, b: 0, a: 1} 754 | m_RaycastTarget: 1 755 | m_OnCullStateChanged: 756 | m_PersistentCalls: 757 | m_Calls: [] 758 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 759 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 760 | m_Sprite: {fileID: 0} 761 | m_Type: 0 762 | m_PreserveAspect: 0 763 | m_FillCenter: 1 764 | m_FillMethod: 4 765 | m_FillAmount: 1 766 | m_FillClockwise: 1 767 | m_FillOrigin: 0 768 | --- !u!114 &114818944812621636 769 | MonoBehaviour: 770 | m_ObjectHideFlags: 1 771 | m_PrefabParentObject: {fileID: 0} 772 | m_PrefabInternal: {fileID: 100100000} 773 | m_GameObject: {fileID: 1889019528067202} 774 | m_Enabled: 1 775 | m_EditorHideFlags: 0 776 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 777 | m_Name: 778 | m_EditorClassIdentifier: 779 | m_Material: {fileID: 0} 780 | m_Color: {r: 0.43382353, g: 0.43382353, b: 0.43382353, a: 1} 781 | m_RaycastTarget: 1 782 | m_OnCullStateChanged: 783 | m_PersistentCalls: 784 | m_Calls: [] 785 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 786 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 787 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 788 | m_Type: 1 789 | m_PreserveAspect: 0 790 | m_FillCenter: 1 791 | m_FillMethod: 4 792 | m_FillAmount: 1 793 | m_FillClockwise: 1 794 | m_FillOrigin: 0 795 | --- !u!114 &114914294799224936 796 | MonoBehaviour: 797 | m_ObjectHideFlags: 1 798 | m_PrefabParentObject: {fileID: 0} 799 | m_PrefabInternal: {fileID: 100100000} 800 | m_GameObject: {fileID: 1838920160049762} 801 | m_Enabled: 1 802 | m_EditorHideFlags: 0 803 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 804 | m_Name: 805 | m_EditorClassIdentifier: 806 | m_Material: {fileID: 0} 807 | m_Color: {r: 1, g: 1, b: 1, a: 1} 808 | m_RaycastTarget: 1 809 | m_OnCullStateChanged: 810 | m_PersistentCalls: 811 | m_Calls: [] 812 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 813 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 814 | m_Sprite: {fileID: 21300000, guid: 1f480de2281007540828889a1f01dee5, type: 3} 815 | m_Type: 0 816 | m_PreserveAspect: 0 817 | m_FillCenter: 1 818 | m_FillMethod: 4 819 | m_FillAmount: 1 820 | m_FillClockwise: 1 821 | m_FillOrigin: 0 822 | --- !u!114 &114923784797720716 823 | MonoBehaviour: 824 | m_ObjectHideFlags: 1 825 | m_PrefabParentObject: {fileID: 0} 826 | m_PrefabInternal: {fileID: 100100000} 827 | m_GameObject: {fileID: 1234947355654648} 828 | m_Enabled: 1 829 | m_EditorHideFlags: 0 830 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 831 | m_Name: 832 | m_EditorClassIdentifier: 833 | m_Navigation: 834 | m_Mode: 3 835 | m_SelectOnUp: {fileID: 0} 836 | m_SelectOnDown: {fileID: 0} 837 | m_SelectOnLeft: {fileID: 0} 838 | m_SelectOnRight: {fileID: 0} 839 | m_Transition: 1 840 | m_Colors: 841 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 842 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 843 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 844 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 845 | m_ColorMultiplier: 1 846 | m_FadeDuration: 0.1 847 | m_SpriteState: 848 | m_HighlightedSprite: {fileID: 0} 849 | m_PressedSprite: {fileID: 0} 850 | m_DisabledSprite: {fileID: 0} 851 | m_AnimationTriggers: 852 | m_NormalTrigger: Normal 853 | m_HighlightedTrigger: Highlighted 854 | m_PressedTrigger: Pressed 855 | m_DisabledTrigger: Disabled 856 | m_Interactable: 1 857 | m_TargetGraphic: {fileID: 114026836944833972} 858 | m_OnClick: 859 | m_PersistentCalls: 860 | m_Calls: [] 861 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 862 | Culture=neutral, PublicKeyToken=null 863 | --- !u!114 &114957224132131578 864 | MonoBehaviour: 865 | m_ObjectHideFlags: 1 866 | m_PrefabParentObject: {fileID: 0} 867 | m_PrefabInternal: {fileID: 100100000} 868 | m_GameObject: {fileID: 1825914912058214} 869 | m_Enabled: 1 870 | m_EditorHideFlags: 0 871 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 872 | m_Name: 873 | m_EditorClassIdentifier: 874 | m_Material: {fileID: 0} 875 | m_Color: {r: 1, g: 1, b: 1, a: 1} 876 | m_RaycastTarget: 1 877 | m_OnCullStateChanged: 878 | m_PersistentCalls: 879 | m_Calls: [] 880 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 881 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 882 | m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} 883 | m_Type: 1 884 | m_PreserveAspect: 0 885 | m_FillCenter: 1 886 | m_FillMethod: 4 887 | m_FillAmount: 1 888 | m_FillClockwise: 1 889 | m_FillOrigin: 0 890 | --- !u!222 &222084203864529276 891 | CanvasRenderer: 892 | m_ObjectHideFlags: 1 893 | m_PrefabParentObject: {fileID: 0} 894 | m_PrefabInternal: {fileID: 100100000} 895 | m_GameObject: {fileID: 1356182944788444} 896 | --- !u!222 &222276794380848332 897 | CanvasRenderer: 898 | m_ObjectHideFlags: 1 899 | m_PrefabParentObject: {fileID: 0} 900 | m_PrefabInternal: {fileID: 100100000} 901 | m_GameObject: {fileID: 1457528175168374} 902 | --- !u!222 &222380023093948856 903 | CanvasRenderer: 904 | m_ObjectHideFlags: 1 905 | m_PrefabParentObject: {fileID: 0} 906 | m_PrefabInternal: {fileID: 100100000} 907 | m_GameObject: {fileID: 1764506732297512} 908 | --- !u!222 &222411604821152150 909 | CanvasRenderer: 910 | m_ObjectHideFlags: 1 911 | m_PrefabParentObject: {fileID: 0} 912 | m_PrefabInternal: {fileID: 100100000} 913 | m_GameObject: {fileID: 1141042578045034} 914 | --- !u!222 &222536902397392982 915 | CanvasRenderer: 916 | m_ObjectHideFlags: 1 917 | m_PrefabParentObject: {fileID: 0} 918 | m_PrefabInternal: {fileID: 100100000} 919 | m_GameObject: {fileID: 1184155270688558} 920 | --- !u!222 &222598074906767294 921 | CanvasRenderer: 922 | m_ObjectHideFlags: 1 923 | m_PrefabParentObject: {fileID: 0} 924 | m_PrefabInternal: {fileID: 100100000} 925 | m_GameObject: {fileID: 1766212973029120} 926 | --- !u!222 &222624718743045994 927 | CanvasRenderer: 928 | m_ObjectHideFlags: 1 929 | m_PrefabParentObject: {fileID: 0} 930 | m_PrefabInternal: {fileID: 100100000} 931 | m_GameObject: {fileID: 1714863424584718} 932 | --- !u!222 &222660928549319476 933 | CanvasRenderer: 934 | m_ObjectHideFlags: 1 935 | m_PrefabParentObject: {fileID: 0} 936 | m_PrefabInternal: {fileID: 100100000} 937 | m_GameObject: {fileID: 1889019528067202} 938 | --- !u!222 &222773618903275896 939 | CanvasRenderer: 940 | m_ObjectHideFlags: 1 941 | m_PrefabParentObject: {fileID: 0} 942 | m_PrefabInternal: {fileID: 100100000} 943 | m_GameObject: {fileID: 1838920160049762} 944 | --- !u!222 &222832259542413104 945 | CanvasRenderer: 946 | m_ObjectHideFlags: 1 947 | m_PrefabParentObject: {fileID: 0} 948 | m_PrefabInternal: {fileID: 100100000} 949 | m_GameObject: {fileID: 1234947355654648} 950 | --- !u!222 &222918929993229090 951 | CanvasRenderer: 952 | m_ObjectHideFlags: 1 953 | m_PrefabParentObject: {fileID: 0} 954 | m_PrefabInternal: {fileID: 100100000} 955 | m_GameObject: {fileID: 1772222688677354} 956 | --- !u!222 &222946717898829020 957 | CanvasRenderer: 958 | m_ObjectHideFlags: 1 959 | m_PrefabParentObject: {fileID: 0} 960 | m_PrefabInternal: {fileID: 100100000} 961 | m_GameObject: {fileID: 1805875822041888} 962 | --- !u!222 &222950798765368374 963 | CanvasRenderer: 964 | m_ObjectHideFlags: 1 965 | m_PrefabParentObject: {fileID: 0} 966 | m_PrefabInternal: {fileID: 100100000} 967 | m_GameObject: {fileID: 1591811641266898} 968 | --- !u!222 &222988711603853768 969 | CanvasRenderer: 970 | m_ObjectHideFlags: 1 971 | m_PrefabParentObject: {fileID: 0} 972 | m_PrefabInternal: {fileID: 100100000} 973 | m_GameObject: {fileID: 1825914912058214} 974 | --- !u!224 &224100596063711994 975 | RectTransform: 976 | m_ObjectHideFlags: 1 977 | m_PrefabParentObject: {fileID: 0} 978 | m_PrefabInternal: {fileID: 100100000} 979 | m_GameObject: {fileID: 1889019528067202} 980 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 981 | m_LocalPosition: {x: 120, y: -200, z: 0} 982 | m_LocalScale: {x: 1, y: 1, z: 1} 983 | m_Children: 984 | - {fileID: 224823570185977958} 985 | m_Father: {fileID: 224122897384252638} 986 | m_RootOrder: 6 987 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 988 | m_AnchorMin: {x: 0.5, y: 0.5} 989 | m_AnchorMax: {x: 0.5, y: 0.5} 990 | m_AnchoredPosition: {x: 120, y: -200} 991 | m_SizeDelta: {x: 180, y: 60} 992 | m_Pivot: {x: 0.5, y: 0.5} 993 | --- !u!224 &224122897384252638 994 | RectTransform: 995 | m_ObjectHideFlags: 1 996 | m_PrefabParentObject: {fileID: 0} 997 | m_PrefabInternal: {fileID: 100100000} 998 | m_GameObject: {fileID: 1457528175168374} 999 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1000 | m_LocalPosition: {x: 0, y: 0, z: 0} 1001 | m_LocalScale: {x: 1, y: 1, z: 1} 1002 | m_Children: 1003 | - {fileID: 224276821921085590} 1004 | - {fileID: 224571646277269068} 1005 | - {fileID: 224946429225115044} 1006 | - {fileID: 224830882199670636} 1007 | - {fileID: 224623994513772056} 1008 | - {fileID: 224325966545253898} 1009 | - {fileID: 224100596063711994} 1010 | m_Father: {fileID: 0} 1011 | m_RootOrder: 0 1012 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1013 | m_AnchorMin: {x: 0, y: 0} 1014 | m_AnchorMax: {x: 1, y: 1} 1015 | m_AnchoredPosition: {x: 0, y: 0} 1016 | m_SizeDelta: {x: 0, y: 0} 1017 | m_Pivot: {x: 0.5, y: 0.5} 1018 | --- !u!224 &224224052963740628 1019 | RectTransform: 1020 | m_ObjectHideFlags: 1 1021 | m_PrefabParentObject: {fileID: 0} 1022 | m_PrefabInternal: {fileID: 100100000} 1023 | m_GameObject: {fileID: 1766212973029120} 1024 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1025 | m_LocalPosition: {x: 0, y: 0, z: 0} 1026 | m_LocalScale: {x: 1, y: 1, z: 1} 1027 | m_Children: [] 1028 | m_Father: {fileID: 224325966545253898} 1029 | m_RootOrder: 0 1030 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1031 | m_AnchorMin: {x: 0, y: 0} 1032 | m_AnchorMax: {x: 1, y: 1} 1033 | m_AnchoredPosition: {x: 0, y: 0} 1034 | m_SizeDelta: {x: 0, y: 0} 1035 | m_Pivot: {x: 0.5, y: 0.5} 1036 | --- !u!224 &224276821921085590 1037 | RectTransform: 1038 | m_ObjectHideFlags: 1 1039 | m_PrefabParentObject: {fileID: 0} 1040 | m_PrefabInternal: {fileID: 100100000} 1041 | m_GameObject: {fileID: 1838920160049762} 1042 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1043 | m_LocalPosition: {x: -0.000030517578, y: 0, z: 0} 1044 | m_LocalScale: {x: 1, y: 1, z: 1} 1045 | m_Children: [] 1046 | m_Father: {fileID: 224122897384252638} 1047 | m_RootOrder: 0 1048 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1049 | m_AnchorMin: {x: 0, y: 0} 1050 | m_AnchorMax: {x: 1, y: 1} 1051 | m_AnchoredPosition: {x: -0.000030517578, y: 0} 1052 | m_SizeDelta: {x: -0.000061035, y: 0} 1053 | m_Pivot: {x: 0.5, y: 0.5} 1054 | --- !u!224 &224304487975737566 1055 | RectTransform: 1056 | m_ObjectHideFlags: 1 1057 | m_PrefabParentObject: {fileID: 0} 1058 | m_PrefabInternal: {fileID: 100100000} 1059 | m_GameObject: {fileID: 1805875822041888} 1060 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1061 | m_LocalPosition: {x: 5, y: -0.5, z: 0} 1062 | m_LocalScale: {x: 1, y: 1, z: 1} 1063 | m_Children: [] 1064 | m_Father: {fileID: 224830882199670636} 1065 | m_RootOrder: 1 1066 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1067 | m_AnchorMin: {x: 0, y: 0} 1068 | m_AnchorMax: {x: 1, y: 1} 1069 | m_AnchoredPosition: {x: 5.000001, y: -0.5} 1070 | m_SizeDelta: {x: -29.999998, y: -13} 1071 | m_Pivot: {x: 0.5, y: 0.5} 1072 | --- !u!224 &224320143488024776 1073 | RectTransform: 1074 | m_ObjectHideFlags: 1 1075 | m_PrefabParentObject: {fileID: 0} 1076 | m_PrefabInternal: {fileID: 100100000} 1077 | m_GameObject: {fileID: 1184155270688558} 1078 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1079 | m_LocalPosition: {x: 0, y: -0.5, z: 0} 1080 | m_LocalScale: {x: 1, y: 1, z: 1} 1081 | m_Children: [] 1082 | m_Father: {fileID: 224830882199670636} 1083 | m_RootOrder: 0 1084 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1085 | m_AnchorMin: {x: 0, y: 0} 1086 | m_AnchorMax: {x: 1, y: 1} 1087 | m_AnchoredPosition: {x: 0, y: -0.49999952} 1088 | m_SizeDelta: {x: -20, y: -13.000001} 1089 | m_Pivot: {x: 0.5, y: 0.5} 1090 | --- !u!224 &224325966545253898 1091 | RectTransform: 1092 | m_ObjectHideFlags: 1 1093 | m_PrefabParentObject: {fileID: 0} 1094 | m_PrefabInternal: {fileID: 100100000} 1095 | m_GameObject: {fileID: 1234947355654648} 1096 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1097 | m_LocalPosition: {x: -120, y: -200, z: 0} 1098 | m_LocalScale: {x: 1, y: 1, z: 1} 1099 | m_Children: 1100 | - {fileID: 224224052963740628} 1101 | m_Father: {fileID: 224122897384252638} 1102 | m_RootOrder: 5 1103 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1104 | m_AnchorMin: {x: 0.5, y: 0.5} 1105 | m_AnchorMax: {x: 0.5, y: 0.5} 1106 | m_AnchoredPosition: {x: -120, y: -200} 1107 | m_SizeDelta: {x: 180, y: 60} 1108 | m_Pivot: {x: 0.5, y: 0.5} 1109 | --- !u!224 &224571646277269068 1110 | RectTransform: 1111 | m_ObjectHideFlags: 1 1112 | m_PrefabParentObject: {fileID: 0} 1113 | m_PrefabInternal: {fileID: 100100000} 1114 | m_GameObject: {fileID: 1141042578045034} 1115 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1116 | m_LocalPosition: {x: -130, y: 0, z: 0} 1117 | m_LocalScale: {x: 1, y: 1, z: 1} 1118 | m_Children: [] 1119 | m_Father: {fileID: 224122897384252638} 1120 | m_RootOrder: 1 1121 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1122 | m_AnchorMin: {x: 0.5, y: 0.5} 1123 | m_AnchorMax: {x: 0.5, y: 0.5} 1124 | m_AnchoredPosition: {x: -130, y: 0} 1125 | m_SizeDelta: {x: 120, y: 40} 1126 | m_Pivot: {x: 0.5, y: 0.5} 1127 | --- !u!224 &224623994513772056 1128 | RectTransform: 1129 | m_ObjectHideFlags: 1 1130 | m_PrefabParentObject: {fileID: 0} 1131 | m_PrefabInternal: {fileID: 100100000} 1132 | m_GameObject: {fileID: 1591811641266898} 1133 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1134 | m_LocalPosition: {x: 110, y: -80, z: 0} 1135 | m_LocalScale: {x: 1, y: 1, z: 1} 1136 | m_Children: 1137 | - {fileID: 224720569909193246} 1138 | - {fileID: 224845719236950640} 1139 | m_Father: {fileID: 224122897384252638} 1140 | m_RootOrder: 4 1141 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1142 | m_AnchorMin: {x: 0.5, y: 0.5} 1143 | m_AnchorMax: {x: 0.5, y: 0.5} 1144 | m_AnchoredPosition: {x: 110, y: -80} 1145 | m_SizeDelta: {x: 280, y: 60} 1146 | m_Pivot: {x: 0.5, y: 0.5} 1147 | --- !u!224 &224720569909193246 1148 | RectTransform: 1149 | m_ObjectHideFlags: 1 1150 | m_PrefabParentObject: {fileID: 0} 1151 | m_PrefabInternal: {fileID: 100100000} 1152 | m_GameObject: {fileID: 1764506732297512} 1153 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1154 | m_LocalPosition: {x: 0, y: -0.5, z: 0} 1155 | m_LocalScale: {x: 1, y: 1, z: 1} 1156 | m_Children: [] 1157 | m_Father: {fileID: 224623994513772056} 1158 | m_RootOrder: 0 1159 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1160 | m_AnchorMin: {x: 0, y: 0} 1161 | m_AnchorMax: {x: 1, y: 1} 1162 | m_AnchoredPosition: {x: 0, y: -0.5} 1163 | m_SizeDelta: {x: -20, y: -13} 1164 | m_Pivot: {x: 0.5, y: 0.5} 1165 | --- !u!224 &224823570185977958 1166 | RectTransform: 1167 | m_ObjectHideFlags: 1 1168 | m_PrefabParentObject: {fileID: 0} 1169 | m_PrefabInternal: {fileID: 100100000} 1170 | m_GameObject: {fileID: 1714863424584718} 1171 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1172 | m_LocalPosition: {x: 0, y: 0, z: 0} 1173 | m_LocalScale: {x: 1, y: 1, z: 1} 1174 | m_Children: [] 1175 | m_Father: {fileID: 224100596063711994} 1176 | m_RootOrder: 0 1177 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1178 | m_AnchorMin: {x: 0, y: 0} 1179 | m_AnchorMax: {x: 1, y: 1} 1180 | m_AnchoredPosition: {x: 0, y: 0} 1181 | m_SizeDelta: {x: 0, y: 0} 1182 | m_Pivot: {x: 0.5, y: 0.5} 1183 | --- !u!224 &224830882199670636 1184 | RectTransform: 1185 | m_ObjectHideFlags: 1 1186 | m_PrefabParentObject: {fileID: 0} 1187 | m_PrefabInternal: {fileID: 100100000} 1188 | m_GameObject: {fileID: 1825914912058214} 1189 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1190 | m_LocalPosition: {x: 110, y: 0, z: 0} 1191 | m_LocalScale: {x: 1, y: 1, z: 1} 1192 | m_Children: 1193 | - {fileID: 224320143488024776} 1194 | - {fileID: 224304487975737566} 1195 | m_Father: {fileID: 224122897384252638} 1196 | m_RootOrder: 3 1197 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1198 | m_AnchorMin: {x: 0.5, y: 0.5} 1199 | m_AnchorMax: {x: 0.5, y: 0.5} 1200 | m_AnchoredPosition: {x: 110, y: 0} 1201 | m_SizeDelta: {x: 280, y: 60} 1202 | m_Pivot: {x: 0.5, y: 0.5} 1203 | --- !u!224 &224845719236950640 1204 | RectTransform: 1205 | m_ObjectHideFlags: 1 1206 | m_PrefabParentObject: {fileID: 0} 1207 | m_PrefabInternal: {fileID: 100100000} 1208 | m_GameObject: {fileID: 1772222688677354} 1209 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1210 | m_LocalPosition: {x: 5, y: -0.5, z: 0} 1211 | m_LocalScale: {x: 1, y: 1, z: 1} 1212 | m_Children: [] 1213 | m_Father: {fileID: 224623994513772056} 1214 | m_RootOrder: 1 1215 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1216 | m_AnchorMin: {x: 0, y: 0} 1217 | m_AnchorMax: {x: 1, y: 1} 1218 | m_AnchoredPosition: {x: 5, y: -0.5} 1219 | m_SizeDelta: {x: -30, y: -13} 1220 | m_Pivot: {x: 0.5, y: 0.5} 1221 | --- !u!224 &224946429225115044 1222 | RectTransform: 1223 | m_ObjectHideFlags: 1 1224 | m_PrefabParentObject: {fileID: 0} 1225 | m_PrefabInternal: {fileID: 100100000} 1226 | m_GameObject: {fileID: 1356182944788444} 1227 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1228 | m_LocalPosition: {x: -130, y: -80, z: 0} 1229 | m_LocalScale: {x: 1, y: 1, z: 1} 1230 | m_Children: [] 1231 | m_Father: {fileID: 224122897384252638} 1232 | m_RootOrder: 2 1233 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1234 | m_AnchorMin: {x: 0.5, y: 0.5} 1235 | m_AnchorMax: {x: 0.5, y: 0.5} 1236 | m_AnchoredPosition: {x: -130, y: -80} 1237 | m_SizeDelta: {x: 120, y: 40} 1238 | m_Pivot: {x: 0.5, y: 0.5} 1239 | -------------------------------------------------------------------------------- /Assets/UI/Resources/LoginPanel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3158cf495390284bb01339253917376 3 | timeCreated: 1510738763 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UI/Resources/RegisterPanel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a39c0fa74942a14d9105bf019cedf0d 3 | timeCreated: 1510911461 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UI/Resources/RoomPanel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9e404e58eab41b438a2451948ceb90a 3 | timeCreated: 1511167846 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 100100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UI/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5774c35afc3a2a4eabdde9b7d65c2c3 3 | folderAsset: yes 4 | timeCreated: 1510658973 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UI/Scripts/AlertPanel.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | /// 5 | /// 提示消息框 6 | /// 7 | public class AlertPanel : UIPanel 8 | { 9 | // 消息内容 10 | private string _message; 11 | 12 | #region UI 组件 13 | 14 | private Text _messageText; 15 | private Button _confirmButton; 16 | 17 | #endregion 18 | 19 | #region 生命周期方法 20 | 21 | /// 22 | /// 初始化 23 | /// 24 | public override void Init(params object[] args) 25 | { 26 | base.Init(args); 27 | 28 | SkinPath = "AlertPanel"; 29 | Layer = PanelLayerEnum.Alert; 30 | 31 | // 从参数列表中获取消息内容 32 | if (args.Length > 0) 33 | { 34 | _message = (string) args[0]; 35 | } 36 | } 37 | 38 | /// 39 | /// 显示界面 40 | /// 41 | public override void OnShowing() 42 | { 43 | base.OnShowing(); 44 | 45 | Transform skinTransform = Skin.transform; 46 | 47 | // 获取 UI 组件的引用 48 | _messageText = skinTransform.Find("MessageText").GetComponent(); 49 | _confirmButton = skinTransform.Find("ConfirmBtn").GetComponent