diff --git a/meng_yao/Assets/Scenes/cultivation_Jinsha_mine_slices.unity b/meng_yao/Assets/Scenes/cultivation_Jinsha_mine_slices.unity index 3b733e481..dd0c2d4eb 100644 --- a/meng_yao/Assets/Scenes/cultivation_Jinsha_mine_slices.unity +++ b/meng_yao/Assets/Scenes/cultivation_Jinsha_mine_slices.unity @@ -2051,6 +2051,7 @@ GameObject: - component: {fileID: 361643071} - component: {fileID: 361643073} - component: {fileID: 361643072} + - component: {fileID: 361643074} m_Layer: 6 m_Name: room1 m_TagString: Untagged @@ -2139,7 +2140,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 361643069} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1ae9e82a9958d53468a476db16fb8032, type: 3} m_Name: @@ -2189,6 +2190,37 @@ BoxCollider2D: serializedVersion: 2 m_Size: {x: 2.347532, y: 4.0412087} m_EdgeRadius: 0 +--- !u!114 &361643074 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 361643069} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 82fbf86d87a4a2743b143d377aaea771, type: 3} + m_Name: + m_EditorClassIdentifier: + roomNumber: 0 + maxNumer: 10 + haveNumber: 0 + type: 0 + buy_type: 0 + haveNumber_text: {fileID: 1337763590} + toolsNumber_text: {fileID: 1489572594} + minerPrefab: {fileID: 4851271842099260498, guid: 012a53cdd7479ae4ab0266e1c577a1ea, type: 3} + gold: {fileID: 1987812376} + startPos: {fileID: 379972121} + itemlist: [] + cazhi: + - {fileID: 2006961055} + - {fileID: 1058917053} + - {fileID: 24607055} + - {fileID: 1131956201} + - {fileID: 1206549371} + BlackRoom: {fileID: 982477524} + Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3} --- !u!1 &379972120 GameObject: m_ObjectHideFlags: 0 @@ -5787,6 +5819,7 @@ GameObject: - component: {fileID: 1026708939} - component: {fileID: 1026708938} - component: {fileID: 1026708937} + - component: {fileID: 1026708940} m_Layer: 6 m_Name: room2 m_TagString: Untagged @@ -5823,7 +5856,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1026708935} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1ae9e82a9958d53468a476db16fb8032, type: 3} m_Name: @@ -5925,6 +5958,37 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!114 &1026708940 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1026708935} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 82fbf86d87a4a2743b143d377aaea771, type: 3} + m_Name: + m_EditorClassIdentifier: + roomNumber: 0 + maxNumer: 10 + haveNumber: 0 + type: 2 + buy_type: 0 + haveNumber_text: {fileID: 1337763590} + toolsNumber_text: {fileID: 1489572594} + minerPrefab: {fileID: 1727175300942666191, guid: bf95ad2db6c84cf4fbcc507e787c7a99, type: 3} + gold: {fileID: 1987812376} + startPos: {fileID: 379972121} + itemlist: [] + cazhi: + - {fileID: 2006961055} + - {fileID: 1058917053} + - {fileID: 24607055} + - {fileID: 1131956201} + - {fileID: 1206549371} + BlackRoom: {fileID: 982477524} + Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3} --- !u!1 &1058917053 GameObject: m_ObjectHideFlags: 0 @@ -6911,6 +6975,7 @@ GameObject: - component: {fileID: 1262522317} - component: {fileID: 1262522316} - component: {fileID: 1262522315} + - component: {fileID: 1262522318} m_Layer: 6 m_Name: room3 m_TagString: Untagged @@ -6947,7 +7012,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1262522313} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1ae9e82a9958d53468a476db16fb8032, type: 3} m_Name: @@ -7049,6 +7114,37 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!114 &1262522318 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1262522313} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 82fbf86d87a4a2743b143d377aaea771, type: 3} + m_Name: + m_EditorClassIdentifier: + roomNumber: 0 + maxNumer: 10 + haveNumber: 0 + type: 4 + buy_type: 0 + haveNumber_text: {fileID: 1337763590} + toolsNumber_text: {fileID: 1489572594} + minerPrefab: {fileID: 7704353754827174037, guid: d425dcacef66eca459336ad16ca91fea, type: 3} + gold: {fileID: 1987812376} + startPos: {fileID: 379972121} + itemlist: [] + cazhi: + - {fileID: 2006961055} + - {fileID: 1058917053} + - {fileID: 24607055} + - {fileID: 1131956201} + - {fileID: 1206549371} + BlackRoom: {fileID: 982477524} + Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3} --- !u!1 &1267245798 GameObject: m_ObjectHideFlags: 0 @@ -10033,6 +10129,7 @@ GameObject: - component: {fileID: 1625391902} - component: {fileID: 1625391901} - component: {fileID: 1625391900} + - component: {fileID: 1625391903} m_Layer: 6 m_Name: room5 m_TagString: Untagged @@ -10069,7 +10166,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1625391898} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1ae9e82a9958d53468a476db16fb8032, type: 3} m_Name: @@ -10171,6 +10268,37 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!114 &1625391903 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1625391898} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 82fbf86d87a4a2743b143d377aaea771, type: 3} + m_Name: + m_EditorClassIdentifier: + roomNumber: 0 + maxNumer: 10 + haveNumber: 0 + type: 8 + buy_type: 0 + haveNumber_text: {fileID: 1337763590} + toolsNumber_text: {fileID: 1489572594} + minerPrefab: {fileID: 1618018427688012061, guid: 73e1e64117f01eb4788657e2602c9872, type: 3} + gold: {fileID: 1987812376} + startPos: {fileID: 379972121} + itemlist: [] + cazhi: + - {fileID: 2006961055} + - {fileID: 1058917053} + - {fileID: 24607055} + - {fileID: 1131956201} + - {fileID: 1206549371} + BlackRoom: {fileID: 982477524} + Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3} --- !u!1 &1625551201 GameObject: m_ObjectHideFlags: 0 @@ -10735,6 +10863,7 @@ GameObject: - component: {fileID: 1737182425} - component: {fileID: 1737182424} - component: {fileID: 1737182423} + - component: {fileID: 1737182426} m_Layer: 6 m_Name: room4 m_TagString: Untagged @@ -10771,7 +10900,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1737182421} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1ae9e82a9958d53468a476db16fb8032, type: 3} m_Name: @@ -10873,6 +11002,37 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!114 &1737182426 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1737182421} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 82fbf86d87a4a2743b143d377aaea771, type: 3} + m_Name: + m_EditorClassIdentifier: + roomNumber: 0 + maxNumer: 10 + haveNumber: 0 + type: 6 + buy_type: 0 + haveNumber_text: {fileID: 1337763590} + toolsNumber_text: {fileID: 1489572594} + minerPrefab: {fileID: 8014035693471197394, guid: 4372a8c781dda0043989a8f5ae52c7fa, type: 3} + gold: {fileID: 1987812376} + startPos: {fileID: 379972121} + itemlist: [] + cazhi: + - {fileID: 2006961055} + - {fileID: 1058917053} + - {fileID: 24607055} + - {fileID: 1131956201} + - {fileID: 1206549371} + BlackRoom: {fileID: 982477524} + Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3} --- !u!1 &1747948505 GameObject: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/script/ConnactServer/JinShaBuy.cs b/meng_yao/Assets/script/ConnactServer/JinShaBuy.cs index d0ea22746..a6623ccfb 100644 --- a/meng_yao/Assets/script/ConnactServer/JinShaBuy.cs +++ b/meng_yao/Assets/script/ConnactServer/JinShaBuy.cs @@ -37,8 +37,16 @@ public class JinShaBuy : mount public void Show_buy(Sprite minerIcon,string minerName,int CurrencyId,int Num,float minerjiage)//¹ºÂòµ¯´° { - + Debug.Log(int.Parse(AssestPanel.instance.Coin.text)); + Debug.Log(minerjiage); + if (int.Parse(AssestPanel.instance.Coin.text) < (int)minerjiage) + { + Promptmgr.Instance.PromptBubble("½ð±Ò²»¹»£¡£¡£¡",Color.black,Color.red); + return; + } + + Debug.Log("µ¯´°³É¹¦"); List boxTypes = new List(); @@ -63,9 +71,14 @@ public class JinShaBuy : mount List gameObjects = gameObject.GetComponent().updateUI(boxTypes, "¹ºÂò");//²âÊÔÊäÈë¿ò»Øµ÷´¦Àí //³õʼ»¯ - number = 1; - max = 10; + number = 1; this.minerjiage = (int)minerjiage; + max = int.Parse(AssestPanel.instance.Coin.text) / this.minerjiage; + + + + + gameObjects[0].GetComponent().numbertextobj1.GetComponent().text = (this.minerjiage * number).ToString(); gameObjects[0].GetComponent().numbertextobj2.GetComponent().text = number.ToString(); diff --git a/meng_yao/Assets/script/Panel/AssestPanel.cs b/meng_yao/Assets/script/Panel/AssestPanel.cs index 7fca50b12..04fe06d25 100644 --- a/meng_yao/Assets/script/Panel/AssestPanel.cs +++ b/meng_yao/Assets/script/Panel/AssestPanel.cs @@ -41,8 +41,7 @@ public class AssestPanel : MonoBehaviour infopyler res = JsonUtility.FromJson(userponse); SetCoinText(res.Info.Gold); SetStoneText(res.Info.Gem); - //SetForgingText(res.Info.Gold); - //SetCoinText(res.Info.Gold); + } public void SetStoneText(float num) @@ -75,5 +74,5 @@ public class AssestPanel : MonoBehaviour } } - + } diff --git a/meng_yao/Assets/script/Player/PlayerManager.cs b/meng_yao/Assets/script/Player/PlayerManager.cs index 2102b3c2b..295d1bee1 100644 --- a/meng_yao/Assets/script/Player/PlayerManager.cs +++ b/meng_yao/Assets/script/Player/PlayerManager.cs @@ -12,9 +12,6 @@ public enum MoneyType { } - - - public class PlayerManager { private static PlayerManager _instance; diff --git a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/RoomJinsha.cs b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/RoomJinsha.cs index c09a17d1d..e58295965 100644 --- a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/RoomJinsha.cs +++ b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/RoomJinsha.cs @@ -44,20 +44,14 @@ public class RoomJinsha : mount ChangeTextPro(); - loding(); + //loding(); // Allminer(); - } - - private void OnEnable() - { - if (toolsNumber_text == null) return; - jinsha.intance.OnType += addman; jinsha.intance.OnType += addtools; - - } + + private void OnDisable() { if (toolsNumber_text == null) return; @@ -228,12 +222,12 @@ public class RoomJinsha : mount } } - private async void loding() - { - Login login = new Login(); - login.Phone = "123456666"; - await web.SendRequest(web.URL + "/Player/Login", "POST", JsonUtility.ToJson(login)); - } + //private async void loding() + //{ + // Login login = new Login(); + // login.Phone = "123456666"; + // await web.SendRequest(web.URL + "/Player/Login", "POST", JsonUtility.ToJson(login)); + //} diff --git a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/jinsha.cs b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/jinsha.cs index 676de34af..30e026ce1 100644 --- a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/jinsha.cs +++ b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/jinsha.cs @@ -90,7 +90,7 @@ public class jinsha : mount Item item = intData.GetTypedData(); Thingid = item.Id.ToString(); - // Debug.Log(mount.mountitem); + go.Show_buy(boxType.icon, boxType.prompt, 64, item.Num, item.ActivateValue); } @@ -181,7 +181,7 @@ public class jinsha : mount Item item = intData.GetTypedData(); Thingid = item.Id.ToString(); //Debug.Log(mount.mountitem); - Debug.Log(itemDataList.Count); + //Debug.Log(itemDataList.Count); if (itemDataList[boxType.Num] ==null) { 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 4bc629d88..c2d65b8a2 100644 --- a/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs +++ b/meng_yao/Assets/script/cultivation_Jinsha_mine_slices/room.cs @@ -115,26 +115,24 @@ public class room : mount return; } - //if (toolsNumber_text == null) - //{ - // Debug.Log("¿ÛÇ®¼ì²â"); - // if (PlayerManager.Instance.GetNumer(MoneyType.Stones) < 11) - // { - // Promptmgr.Instance.PromptBubble("¹ºÂò¾í²»×ã", Color.black, Color.red); - // return; - // } - // PlayerManager.Instance.SetMoney(MoneyType.Stones, -10); - //} - Generate(1); - if (Buy_succefful) - { - GetRoom(); - //haveNumber--; - //toolsNumber--; - UpdateShowCazhi(); - ChangeTextPro(); - Buy_succefful = false; + if (toolsNumber_text == null) + { + Debug.Log("¿ÛÇ®¼ì²â"); + if (PlayerManager.Instance.GetNumer(MoneyType.Stones) < 11) + { + Promptmgr.Instance.PromptBubble("¹ºÂò¾í²»×ã", Color.black, Color.red); + return; + } + PlayerManager.Instance.SetMoney(MoneyType.Stones, -10); } + + GetRoom(); + haveNumber--; + toolsNumber--; + UpdateShowCazhi(); + ChangeTextPro(); + +