diff --git a/meng_yao/Assets/Scenes/scene_Main.unity b/meng_yao/Assets/Scenes/scene_Main.unity index ec22d4c90..9a3461cf6 100644 --- a/meng_yao/Assets/Scenes/scene_Main.unity +++ b/meng_yao/Assets/Scenes/scene_Main.unity @@ -30952,7 +30952,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.025, y: 0.030311445} m_AnchorMax: {x: 0.9611111, y: 0.9543046} - m_AnchoredPosition: {x: -12.108826, y: -8.926025} + m_AnchoredPosition: {x: -12.108887, y: -8.926025} m_SizeDelta: {x: -24.2167, y: -139.65} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &411650908 diff --git a/meng_yao/Assets/common b/meng_yao/Assets/common index 8fde27042..f9085935d 160000 --- a/meng_yao/Assets/common +++ b/meng_yao/Assets/common @@ -1 +1 @@ -Subproject commit 8fde270423daa41bf2968599462aafe4bac70722 +Subproject commit f9085935d5427ccc6ac969d9721c841354f63e43 diff --git a/meng_yao/Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs b/meng_yao/Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs index 17fc991bd..3f8999cdc 100644 --- a/meng_yao/Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs +++ b/meng_yao/Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs @@ -128,12 +128,6 @@ public class BaoshiRoomcontroller : MonoBehaviour return; } - //if (fishMan == null) - //{ - // Promptmgr.Instance.PromptBubble("还没有买精灵!", Color.black, Color.red); - // return; - //} - if (await ActivationRoom()) { add_fish(); diff --git a/meng_yao/Assets/script/scene_Main/scene/Scene_baoshidao.cs b/meng_yao/Assets/script/scene_Main/scene/Scene_baoshidao.cs index 97d33cf8a..4cb0b9c8f 100644 --- a/meng_yao/Assets/script/scene_Main/scene/Scene_baoshidao.cs +++ b/meng_yao/Assets/script/scene_Main/scene/Scene_baoshidao.cs @@ -25,13 +25,22 @@ public class Scene_baoshidao : MonoBehaviour int index = 0; foreach (MinngConfigData info in infos) { - lands[index].GetComponent().RoomId = info.Id; - lands[index].GetComponent().daoyuName.text = info.Name; + baoshidao_contorl go = lands[index].GetComponent(); + + go.RoomId = info.Id; + go.daoyuName.text = info.Name; + go.ActivateValue = info.Price; + go.goldNumerTextPro.text = info.Price.ToString("f0"); + + if (info.ActivateCount > 0) + { + for (int temp = info.ActivateCount; temp > 0; temp--) + { + go.OnClick(); + } + } + - lands[index].GetComponent().ActivateValue = info.Price; - lands[index].GetComponent().goldNumerTextPro.text = info.Price.ToString("f0"); - - index++; } } diff --git a/meng_yao/Assets/script/scene_Main/scene/Scene_baoshikuang.cs b/meng_yao/Assets/script/scene_Main/scene/Scene_baoshikuang.cs index af994200a..811c4dd65 100644 --- a/meng_yao/Assets/script/scene_Main/scene/Scene_baoshikuang.cs +++ b/meng_yao/Assets/script/scene_Main/scene/Scene_baoshikuang.cs @@ -26,11 +26,20 @@ public class Scene_baoshikuang : MonoBehaviour int index = 0; foreach (MinngConfigData info in infos) { - lands[index].GetComponent().RoomId = info.Id; - if (info.ActivateCount>0) - { + BaoshiRoomcontroller roomController = lands[index].GetComponent(); + // 更新 RoomId + roomController.RoomId = info.Id; + + // 如果 ActivateCount 大于 0,则调用 OnClick 方法 + if (info.ActivateCount > 0) + { + for (int temp = 0; temp < info.ActivateCount; temp++) // 使用更常见的循环方式 + { + roomController.OnClick(); + } } + index++; } } diff --git a/meng_yao/Assets/script/scene_Main/scene/Scene_jinbikuang.cs b/meng_yao/Assets/script/scene_Main/scene/Scene_jinbikuang.cs index aeea0ba0d..6f4804029 100644 --- a/meng_yao/Assets/script/scene_Main/scene/Scene_jinbikuang.cs +++ b/meng_yao/Assets/script/scene_Main/scene/Scene_jinbikuang.cs @@ -25,14 +25,17 @@ public class Scene_jinbikuang : MonoBehaviour int index = 0; foreach (MinngConfigData info in infos) { - lands[index].GetComponent().RoomId = info.Id; - //lands[index].GetComponent().RoomName.text = info.Name; - - lands[index].GetComponent().ActivateValue = info.Price; - //lands[index].GetComponent().goldNumerTextPro.text = info.Price.ToString("f0"); - // lands[index].GetComponent().shipNumberTextPro.text = - // info.ActivateCount.ToString() + "/" + info.ActivateLimit; + roomcontroller go = lands[index].GetComponent(); + go.RoomId = info.Id; + go.ActivateValue = info.Price; + if (info.ActivateCount > 0) + { + for (int temp = info.ActivateCount; temp > 0; temp--) + { + go.OnClick(); + } + } index++; } diff --git a/meng_yao/Assets/script/scene_Main/scene/scene_jingshadao.cs b/meng_yao/Assets/script/scene_Main/scene/scene_jingshadao.cs index 1eec22905..f5ae081c6 100644 --- a/meng_yao/Assets/script/scene_Main/scene/scene_jingshadao.cs +++ b/meng_yao/Assets/script/scene_Main/scene/scene_jingshadao.cs @@ -25,15 +25,23 @@ public class scene_jingshadao : MonoBehaviour int index = 0; foreach (MinngConfigData info in infos) { - lands[index].GetComponent().RoomId = info.Id; - lands[index].GetComponent().daoyuName.text = info.Name; + jishadao_contorl go = lands[index].GetComponent(); + go.RoomId = info.Id; + go.daoyuName.text = info.Name; - lands[index].GetComponent().ActivateValue = info.Price; - lands[index].GetComponent().goldNumerTextPro.text = info.Price.ToString("f0"); - lands[index].GetComponent().shipNumberTextPro.text = - info.ActivateCount.ToString() + "/" + info.ActivateLimit; + go.ActivateValue = info.Price; + go.goldNumerTextPro.text = info.Price.ToString("f0"); + go.shipNumberTextPro.text =info.ActivateCount.ToString() + "/" + info.ActivateLimit; + if (info.ActivateCount > 0) + { + for (int temp = info.ActivateCount; temp > 0; temp--) + { + go.OnClick(); + } + } + index++; } }