Assets/Resources/UI/Loading.meta | ●●●●● patch | view | raw | blame | history | |
Assets/Resources/UI/Loading/0.png | patch | view | raw | blame | history | |
Assets/Resources/UI/Loading/0.png.meta | ●●●●● patch | view | raw | blame | history | |
Assets/Resources/UI/Loading/1.png | patch | view | raw | blame | history | |
Assets/Resources/UI/Loading/1.png.meta | ●●●●● patch | view | raw | blame | history | |
Assets/Scenes/LoadingScene.unity | ●●●●● patch | view | raw | blame | history | |
Assets/Scripts/Common/GameConfig.cs | ●●●●● patch | view | raw | blame | history | |
Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs | ●●●●● patch | view | raw | blame | history | |
Assets/Scripts/TowerDefense/UI/EndlessSettlement.cs | ●●●●● patch | view | raw | blame | history |
Assets/Resources/UI/Loading.meta
New file @@ -0,0 +1,8 @@ fileFormatVersion: 2 guid: be016591e393c324d8d42173a30c6eac folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: Assets/Resources/UI/Loading/0.png
Assets/Resources/UI/Loading/0.png.meta
New file @@ -0,0 +1,118 @@ fileFormatVersion: 2 guid: de9bb2c4c2028724fbb614af8e4752a8 TextureImporter: internalIDToNameTable: [] externalObjects: {} serializedVersion: 11 mipmaps: mipMapMode: 0 enableMipMap: 0 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 borderMipMap: 0 mipMapsPreserveCoverage: 0 alphaTestReferenceValue: 0.5 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: convertToNormalMap: 0 externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 seamlessCubemap: 0 textureFormat: 1 maxTextureSize: 2048 textureSettings: serializedVersion: 2 filterMode: -1 aniso: -1 mipBias: -100 wrapU: 1 wrapV: 1 wrapW: -1 nPOTScale: 0 lightmap: 0 compressionQuality: 50 spriteMode: 1 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: 4 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 1 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 internalID: 0 vertices: [] indices: edges: [] weights: [] secondaryTextures: [] spritePackingTag: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: Assets/Resources/UI/Loading/1.png
Assets/Resources/UI/Loading/1.png.meta
New file @@ -0,0 +1,118 @@ fileFormatVersion: 2 guid: 425d45c6832baa846b92567e606430c6 TextureImporter: internalIDToNameTable: [] externalObjects: {} serializedVersion: 11 mipmaps: mipMapMode: 0 enableMipMap: 0 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 borderMipMap: 0 mipMapsPreserveCoverage: 0 alphaTestReferenceValue: 0.5 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: convertToNormalMap: 0 externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 seamlessCubemap: 0 textureFormat: 1 maxTextureSize: 2048 textureSettings: serializedVersion: 2 filterMode: -1 aniso: -1 mipBias: -100 wrapU: 1 wrapV: 1 wrapW: -1 nPOTScale: 0 lightmap: 0 compressionQuality: 50 spriteMode: 1 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 alphaIsTransparency: 1 spriteTessellationDetail: -1 textureType: 8 textureShape: 1 singleChannelComponent: 0 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: 4 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 1 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 internalID: 0 vertices: [] indices: edges: [] weights: [] secondaryTextures: [] spritePackingTag: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: Assets/Scenes/LoadingScene.unity
@@ -1463,6 +1463,81 @@ m_AnchoredPosition: {x: -1.499999, y: 0} m_SizeDelta: {x: -63, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1962845600 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1962845601} - component: {fileID: 1962845603} - component: {fileID: 1962845602} m_Layer: 5 m_Name: Image m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1962845601 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1962845600} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1970259399} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 10} m_SizeDelta: {x: 203, y: 54} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1962845602 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1962845600} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_Sprite: {fileID: 21300000, guid: de9bb2c4c2028724fbb614af8e4752a8, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 --- !u!222 &1962845603 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1962845600} m_CullTransparentMesh: 0 --- !u!1 &1970259398 GameObject: m_ObjectHideFlags: 0 @@ -1492,7 +1567,8 @@ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Children: - {fileID: 1962845601} m_Father: {fileID: 2142699187} m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1564,8 +1640,8 @@ m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_Sprite: {fileID: 21300000, guid: f2b671c6bf33d0c45a28ee928d8eca9e, type: 3} m_Type: 0 m_Sprite: {fileID: 21300000, guid: 28a0f25ee3c7f2749bd6a571f5198f8a, type: 3} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 Assets/Scripts/Common/GameConfig.cs
@@ -106,6 +106,11 @@ /// </summary> public static bool InfiniteSkill; /// <summary> /// 关卡完成次数,通关或者是没过关爱心数量为0 /// </summary> public static int GameCompletedCount; #region 各个塔的偏移量 public static Vector3 fireScale = new Vector3(1.92f, 1.92f, 2.208f); public static Vector3 woodScale = new Vector3(1.5f, 1.5f, 2.82f); Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs
@@ -22,8 +22,7 @@ private Text versionTxt;//版本号 private Text resVersion;//资源版本号 float waitTime;//加载等待时间 float waitTime;//切换场景等待时间 [SerializeField] private Sprite nextSprite; @@ -55,13 +54,27 @@ OnClickResetBtn(); }); if (!GameConfig.isFirstStart)//后续直接加载 { waitTime = 2f; //transform.Find("Panel/Button (1)").GetComponent<Button>().onClick.AddListener(OnClickResetBtn); LoadNextScene(); if (Application.platform == RuntimePlatform.Android) { //GetetDeviceIMEI();//获取安卓手机IMEI imei0 = TDAA_SDKManager.Ins.GetDeviceId();//使用设备ID } else else if (Application.platform == RuntimePlatform.WindowsEditor) { imei0 = "MyTestGemBattle123"; } GameConfig.PlayerName = imei0; versionTxt.text = "版本号:" + Application.version; //resVersion.text 暂时没有使用 transform.Find("Panel/PlayerID").GetComponent<Text>().text = "玩家ID:" + imei0; if (GameConfig.isFirstStart) { waitTime = 0f; //第一次启动,初始化并且埋点 @@ -70,22 +83,27 @@ TDAA_SDKManager.Ins.SDKInit(ChannelID.Gm.ToString()); TDAA_SDKManager.Ins.Statistics(1);//成功加载登陆界面的人数 } } SetStart(); } void loginNext() /// <summary> /// 设置开始状态 /// </summary> private void SetStart() { GameConfig.PlayerName = SDKManager.ins.sdk.uid; versionTxt.text = "版本号:" + Application.version; //resVersion.text 暂时没有使用 transform.Find("Panel/PlayerID").GetComponent<Text>().text = "玩家ID:" + SDKManager.ins.sdk.uid; LoadNextScene(); startBtn.gameObject.SetActive(true); int resId = Mathf.FloorToInt(Mathf.Clamp01(GameConfig.GameCompletedCount)); Image img = startBtn.transform.GetChild(0).GetComponent<Image>(); img.sprite = Resources.Load<Sprite>($"UI/Loading/{resId}"); img.SetNativeSize(); } private void LoadNextScene() /// <summary> /// 开始游戏 /// </summary> void loginNext() { progressSlider.gameObject.SetActive(true); startBtn.gameObject.SetActive(false); @@ -96,6 +114,8 @@ GameConfig.isFirstStart = false; StartCoroutine(loginMy()); } #region 获得安卓手机上的IMEI号 public string imei0 = ""; @@ -131,15 +151,17 @@ { if (!isLogining) { // CoderM: 在这里要使用SDK来进行登录了 if (GameConfig.useSDK) { // CoderM: 在这里要使用SDK来进行登录了 //设置login的回调 SDKCallBack.ins.setNextAction("login", loginNext); SDKManager.ins.sdk.login(); } else { LoadNextScene(); //没有使用SDK loginNext(); } } else Assets/Scripts/TowerDefense/UI/EndlessSettlement.cs
@@ -113,6 +113,7 @@ /// </summary> protected void Victory() { ++GameConfig.GameCompletedCount; EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.EndlessLevelCompleted); EndlessUIStart.instance.Pause();