From cc65145114ee3a6afa0c3b9a26614c2295b20539 Mon Sep 17 00:00:00 2001 From: hyskai <2545507770@qq.com> Date: Tue, 29 Oct 2024 16:57:55 +0800 Subject: [PATCH] add --- meng_yao/Assets/RegisterUser.cs | 87 ------------ meng_yao/Assets/RegisterUser.cs.meta | 11 -- .../cultivation_diamond_mines_slices.unity | 40 ++++++ .../Scenes/cultivation_gold_coin_Island.unity | 124 ++++++++++++++++++ meng_yao/Assets/UpdateChiclPosition.cs | 27 ---- meng_yao/Assets/UpdateChiclPosition.cs.meta | 11 -- .../res/first_charge_slices/icn_diamond.png | 0 .../first_charge_slices/icn_diamond.png.meta | 87 ------------ .../Assets/res/main_slices/img_jdt003.png | 0 .../res/main_slices/img_jdt003.png.meta | 87 ------------ .../cultivation_Jinsha_mine_slices/room.cs | 27 +++- .../landContorl.cs | 6 + .../shipcontorl.cs | 20 +++ .../shipcontorl.cs.meta} | 2 +- meng_yao/Assets/text.cs | 37 ------ meng_yao/Assets/text_1.cs | 23 ---- meng_yao/Assets/text_1.cs.meta | 11 -- 17 files changed, 215 insertions(+), 385 deletions(-) delete mode 100644 meng_yao/Assets/RegisterUser.cs delete mode 100644 meng_yao/Assets/RegisterUser.cs.meta delete mode 100644 meng_yao/Assets/UpdateChiclPosition.cs delete mode 100644 meng_yao/Assets/UpdateChiclPosition.cs.meta delete mode 100644 meng_yao/Assets/res/first_charge_slices/icn_diamond.png delete mode 100644 meng_yao/Assets/res/first_charge_slices/icn_diamond.png.meta delete mode 100644 meng_yao/Assets/res/main_slices/img_jdt003.png delete mode 100644 meng_yao/Assets/res/main_slices/img_jdt003.png.meta create mode 100644 meng_yao/Assets/script/cultivation_gold_coin_Island/shipcontorl.cs rename meng_yao/Assets/{text.cs.meta => script/cultivation_gold_coin_Island/shipcontorl.cs.meta} (83%) delete mode 100644 meng_yao/Assets/text.cs delete mode 100644 meng_yao/Assets/text_1.cs delete mode 100644 meng_yao/Assets/text_1.cs.meta diff --git a/meng_yao/Assets/RegisterUser.cs b/meng_yao/Assets/RegisterUser.cs deleted file mode 100644 index a2797e55e..000000000 --- a/meng_yao/Assets/RegisterUser.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System.Collections; -using System.Net.Sockets; -using UnityEngine; -using UnityEngine.Networking; - -public class RegisterUser : MonoBehaviour -{ - // 注册 API 地址 - private string registerUrl = "http://47.109.133.52/Player/Register"; // 使用你提供的IP地址 - - // 模拟注册数据 - private string phone = "88888888888"; - private string code = "123456"; - private void Start() - { - Register(); - } - // 注册按钮调用的函数 - public void Register() - { - // 构造请求数据 - StartCoroutine(RegisterCoroutine(phone, code)); - } - - // 协程用于发送POST请求并处理返回 - IEnumerator RegisterCoroutine(string phone, string code) - { - // 创建POST请求的数据 - string jsonData = JsonUtility.ToJson(new RegisterData(phone, code)); - - // 构造UnityWebRequest请求 - using (UnityWebRequest request = new UnityWebRequest(registerUrl, "POST")) - { - byte[] bodyRaw = System.Text.Encoding.UTF8.GetBytes(jsonData); - request.uploadHandler = new UploadHandlerRaw(bodyRaw); - request.downloadHandler = new DownloadHandlerBuffer(); - request.SetRequestHeader("Content-Type", "application/json"); - - // 发送请求并等待响应 - yield return request.SendWebRequest(); - - // 检查请求是否出错 - if (request.result == UnityWebRequest.Result.Success) - { - // 解析返回数据 - string responseText = request.downloadHandler.text; - RegisterResponse response = JsonUtility.FromJson(responseText); - Debug.Log("error code:"+response.ErrorCode+"\nerror message:"+response.ErrorMessage); - // 根据服务器返回的数据进行处理 - if (response.ErrorCode == 0) - { - Debug.Log("注册成功"); - } - else if (response.ErrorCode == 3) - { - Debug.Log("账号已经存在: " + response.ErrorMessage); - } - } - else - { - Debug.LogError("请求失败: " + request.error); - } - } // using 语句会自动调用 Dispose() 方法 - } -} - -// 注册请求数据类 -[System.Serializable] -public class RegisterData -{ - public string Phone; - public string Code; - - public RegisterData(string phone, string code) - { - this.Phone = phone; - this.Code = code; - } -} - -// 注册返回数据类 -[System.Serializable] -public class RegisterResponse -{ - public int ErrorCode; - public string ErrorMessage; -} diff --git a/meng_yao/Assets/RegisterUser.cs.meta b/meng_yao/Assets/RegisterUser.cs.meta deleted file mode 100644 index 9cddd412e..000000000 --- a/meng_yao/Assets/RegisterUser.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1b46181e724d8254ea443bf4894dd1e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/meng_yao/Assets/Scenes/cultivation_diamond_mines_slices.unity b/meng_yao/Assets/Scenes/cultivation_diamond_mines_slices.unity index 2b823c48d..b83866d2e 100644 --- a/meng_yao/Assets/Scenes/cultivation_diamond_mines_slices.unity +++ b/meng_yao/Assets/Scenes/cultivation_diamond_mines_slices.unity @@ -4668,10 +4668,18 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 1309263783, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_SizeDelta.x + value: 717.92 + objectReference: {fileID: 0} - target: {fileID: 1309263783, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_SizeDelta.y value: 236.8071 objectReference: {fileID: 0} + - target: {fileID: 1309263783, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_AnchoredPosition.x + value: 358.96 + objectReference: {fileID: 0} - target: {fileID: 1309263783, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_AnchoredPosition.y value: -1105.632 @@ -4684,10 +4692,18 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 1323663683, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_SizeDelta.x + value: 717.92 + objectReference: {fileID: 0} - target: {fileID: 1323663683, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_SizeDelta.y value: 236.8071 objectReference: {fileID: 0} + - target: {fileID: 1323663683, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_AnchoredPosition.x + value: 358.96 + objectReference: {fileID: 0} - target: {fileID: 1323663683, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_AnchoredPosition.y value: -858.8248 @@ -4700,10 +4716,18 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 1370749644, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_SizeDelta.x + value: 717.92 + objectReference: {fileID: 0} - target: {fileID: 1370749644, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_SizeDelta.y value: 236.8071 objectReference: {fileID: 0} + - target: {fileID: 1370749644, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_AnchoredPosition.x + value: 358.96 + objectReference: {fileID: 0} - target: {fileID: 1370749644, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_AnchoredPosition.y value: -612.01776 @@ -4852,10 +4876,18 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 772119012549100884, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_SizeDelta.x + value: 717.92 + objectReference: {fileID: 0} - target: {fileID: 772119012549100884, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_SizeDelta.y value: 236.8071 objectReference: {fileID: 0} + - target: {fileID: 772119012549100884, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_AnchoredPosition.x + value: 358.96 + objectReference: {fileID: 0} - target: {fileID: 772119012549100884, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_AnchoredPosition.y value: -118.40355 @@ -5176,10 +5208,18 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 8404034800197096179, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_SizeDelta.x + value: 717.92 + objectReference: {fileID: 0} - target: {fileID: 8404034800197096179, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_SizeDelta.y value: 236.8071 objectReference: {fileID: 0} + - target: {fileID: 8404034800197096179, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} + propertyPath: m_AnchoredPosition.x + value: 358.96 + objectReference: {fileID: 0} - target: {fileID: 8404034800197096179, guid: bcc7c174ff2f25442aff6e479fe3d954, type: 3} propertyPath: m_AnchoredPosition.y value: -365.21063 diff --git a/meng_yao/Assets/Scenes/cultivation_gold_coin_Island.unity b/meng_yao/Assets/Scenes/cultivation_gold_coin_Island.unity index 2a2e3d306..403ab5b3c 100644 --- a/meng_yao/Assets/Scenes/cultivation_gold_coin_Island.unity +++ b/meng_yao/Assets/Scenes/cultivation_gold_coin_Island.unity @@ -1030,6 +1030,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 559443431} + - component: {fileID: 559443433} + - component: {fileID: 559443432} m_Layer: 0 m_Name: top1 m_TagString: Untagged @@ -1055,6 +1057,128 @@ Transform: m_Father: {fileID: 787643888} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &559443432 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 559443430} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9aea6b85491b20b4ea34c75ad09c4ec9, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!61 &559443433 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 559443430} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: -0.07494098, y: -0.02869153} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0, y: 0} + oldSize: {x: 0, y: 0} + newSize: {x: 0, y: 0} + adaptiveTilingThreshold: 0 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 3.5458484, y: 3.319406} + m_EdgeRadius: 0 +--- !u!1 &732952406 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 732952408} + - component: {fileID: 732952407} + m_Layer: 0 + m_Name: cuizhi + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &732952407 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732952406} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: f6884187fb833964ea9e632b9d5a8252, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.87, y: 0.93} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &732952408 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732952406} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -3.32, y: 4.46, z: -8} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 10 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &733512739 GameObject: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/UpdateChiclPosition.cs b/meng_yao/Assets/UpdateChiclPosition.cs deleted file mode 100644 index d03730ede..000000000 --- a/meng_yao/Assets/UpdateChiclPosition.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEditor.PackageManager; -using UnityEngine; -using UnityEngine.UI; - -public class UpdateChiclPosition : MonoBehaviour -{ - short previousChildCount; - // Start is called before the first frame update - void Start() - { - previousChildCount = (short)transform.childCount; - } - - // Update is called once per frame - void Update() - { - if (transform.childCount>previousChildCount) - { - previousChildCount = (short)transform.childCount; - ; - - } - - } -} diff --git a/meng_yao/Assets/UpdateChiclPosition.cs.meta b/meng_yao/Assets/UpdateChiclPosition.cs.meta deleted file mode 100644 index 18d0f62fe..000000000 --- a/meng_yao/Assets/UpdateChiclPosition.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: db5427edba4bdcf40af83b9b8d94def0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/meng_yao/Assets/res/first_charge_slices/icn_diamond.png b/meng_yao/Assets/res/first_charge_slices/icn_diamond.png deleted file mode 100644 index e69de29bb..000000000 diff --git a/meng_yao/Assets/res/first_charge_slices/icn_diamond.png.meta b/meng_yao/Assets/res/first_charge_slices/icn_diamond.png.meta deleted file mode 100644 index 5cc75bd5f..000000000 --- a/meng_yao/Assets/res/first_charge_slices/icn_diamond.png.meta +++ /dev/null @@ -1,87 +0,0 @@ -fileFormatVersion: 2 -guid: d14a2fc7584e340489c8de3662c07f57 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 12 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - 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: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - cookieLightType: 0 - platformSettings: [] - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/meng_yao/Assets/res/main_slices/img_jdt003.png b/meng_yao/Assets/res/main_slices/img_jdt003.png deleted file mode 100644 index e69de29bb..000000000 diff --git a/meng_yao/Assets/res/main_slices/img_jdt003.png.meta b/meng_yao/Assets/res/main_slices/img_jdt003.png.meta deleted file mode 100644 index ffc0bcd69..000000000 --- a/meng_yao/Assets/res/main_slices/img_jdt003.png.meta +++ /dev/null @@ -1,87 +0,0 @@ -fileFormatVersion: 2 -guid: 889b99946f04eff448e4e5c5193428cd -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 12 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - 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: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - cookieLightType: 0 - platformSettings: [] - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs index 71b83db52..dae525351 100644 --- a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs +++ b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs @@ -29,9 +29,7 @@ public class room : MonoBehaviour public GameObject Boom; // Start is called before the first frame update void Start() - { - /*haveNumber_text.text = haveNumber.ToString() + "/" + maxNumer.ToString(); - toolsNumber_text.text = toolsNumber.ToString() + "/" + maxNumer.ToString(); */ + { if (toolsNumber_text==null) { toolsNumber = 10; @@ -58,6 +56,29 @@ public class room : MonoBehaviour } + private async void OnTouch() + { + if (haveNumber < 1 || toolsNumber < 1) + { + Promptmgr.Instance.PromptBubble("人数或工具不足", Color.black, Color.red); + return; + } + + haveNumber--; + toolsNumber--; + UpdateShowCazhi(); + ChangeTextPro(); + + //Vector3 + GameObject.Instantiate(Boom, new Vector3(startPos.position.x, startPos.position.y + 0.5f, startPos.position.z - 1f), Quaternion.identity); + await Task.Delay(500); + GameObject newMiner = GameObject.Instantiate(minerPrefab); + newMiner.transform.SetParent(startPos); + newMiner.transform.position = startPos.position; + } + + + private async void OnMouseDown() { if (haveNumber<1||toolsNumber<1) diff --git a/meng_yao/Assets/script/cultivation_gold_coin_Island/landContorl.cs b/meng_yao/Assets/script/cultivation_gold_coin_Island/landContorl.cs index 0cfe76345..b924e71cf 100644 --- a/meng_yao/Assets/script/cultivation_gold_coin_Island/landContorl.cs +++ b/meng_yao/Assets/script/cultivation_gold_coin_Island/landContorl.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using DG.Tweening; public class landContorl : MonoBehaviour { @@ -15,4 +16,9 @@ public class landContorl : MonoBehaviour { } + + private void OnMouseDown() + { + + } } diff --git a/meng_yao/Assets/script/cultivation_gold_coin_Island/shipcontorl.cs b/meng_yao/Assets/script/cultivation_gold_coin_Island/shipcontorl.cs new file mode 100644 index 000000000..219d8ff29 --- /dev/null +++ b/meng_yao/Assets/script/cultivation_gold_coin_Island/shipcontorl.cs @@ -0,0 +1,20 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using DG.Tweening; + +public class shipcontorl : MonoBehaviour +{ + + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/meng_yao/Assets/text.cs.meta b/meng_yao/Assets/script/cultivation_gold_coin_Island/shipcontorl.cs.meta similarity index 83% rename from meng_yao/Assets/text.cs.meta rename to meng_yao/Assets/script/cultivation_gold_coin_Island/shipcontorl.cs.meta index b7f4589db..767e57994 100644 --- a/meng_yao/Assets/text.cs.meta +++ b/meng_yao/Assets/script/cultivation_gold_coin_Island/shipcontorl.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f368307b2ff693c4a8ad9b8b29920664 +guid: 8ed7be4c620c11047bd3ae8a4b7fe15e MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/meng_yao/Assets/text.cs b/meng_yao/Assets/text.cs deleted file mode 100644 index 74c4f0b42..000000000 --- a/meng_yao/Assets/text.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; -using UnityEngine.SceneManagement; -public class text : MonoBehaviour -{ - public event Action TimeEnd; - - private float tim = 0f; - public Image img; - bool is_time_ing = true; - float time_max = 0; - public void upadte_time(float times) - { - tim = times; - time_max = times; - is_time_ing = false; - - } - // Update is called once per frame - void Update() - { - if (tim > 0) - { - tim -= Time.deltaTime; - img.fillAmount = tim / time_max; - } - else if (!is_time_ing) - { - is_time_ing = true; - TimeEnd.Invoke(); - } - - } -} diff --git a/meng_yao/Assets/text_1.cs b/meng_yao/Assets/text_1.cs deleted file mode 100644 index 5e1724d77..000000000 --- a/meng_yao/Assets/text_1.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class text_1 : MonoBehaviour -{ - private text t1; - // Start is called before the first frame update - void Start() - { - - t1 = this.GetComponent(); - t1.TimeEnd += test; - - - t1.upadte_time(1); - } - - void test() - { - Debug.Log("计时器完成了!"); - } -} diff --git a/meng_yao/Assets/text_1.cs.meta b/meng_yao/Assets/text_1.cs.meta deleted file mode 100644 index 872194557..000000000 --- a/meng_yao/Assets/text_1.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e9d5fdd4e85f96c458136f6b5567adb4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: