This commit is contained in:
liuliang 2024-12-19 17:32:21 +08:00
commit 34af355f9d
7 changed files with 53 additions and 30 deletions

View File

@ -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

@ -1 +1 @@
Subproject commit 8fde270423daa41bf2968599462aafe4bac70722
Subproject commit f9085935d5427ccc6ac969d9721c841354f63e43

View File

@ -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();

View File

@ -25,13 +25,22 @@ public class Scene_baoshidao : MonoBehaviour
int index = 0;
foreach (MinngConfigData info in infos)
{
lands[index].GetComponent<baoshidao_contorl>().RoomId = info.Id;
lands[index].GetComponent<baoshidao_contorl>().daoyuName.text = info.Name;
baoshidao_contorl go = lands[index].GetComponent<baoshidao_contorl>();
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<baoshidao_contorl>().ActivateValue = info.Price;
lands[index].GetComponent<baoshidao_contorl>().goldNumerTextPro.text = info.Price.ToString("f0");
index++;
}
}

View File

@ -26,11 +26,20 @@ public class Scene_baoshikuang : MonoBehaviour
int index = 0;
foreach (MinngConfigData info in infos)
{
lands[index].GetComponent<BaoshiRoomcontroller>().RoomId = info.Id;
if (info.ActivateCount>0)
{
BaoshiRoomcontroller roomController = lands[index].GetComponent<BaoshiRoomcontroller>();
// 更新 RoomId
roomController.RoomId = info.Id;
// 如果 ActivateCount 大于 0则调用 OnClick 方法
if (info.ActivateCount > 0)
{
for (int temp = 0; temp < info.ActivateCount; temp++) // 使用更常见的循环方式
{
roomController.OnClick();
}
}
index++;
}
}

View File

@ -25,14 +25,17 @@ public class Scene_jinbikuang : MonoBehaviour
int index = 0;
foreach (MinngConfigData info in infos)
{
lands[index].GetComponent<roomcontroller>().RoomId = info.Id;
//lands[index].GetComponent<roomcontroller>().RoomName.text = info.Name;
lands[index].GetComponent<roomcontroller>().ActivateValue = info.Price;
//lands[index].GetComponent<roomcontroller>().goldNumerTextPro.text = info.Price.ToString("f0");
// lands[index].GetComponent<roomcontroller>().shipNumberTextPro.text =
// info.ActivateCount.ToString() + "/" + info.ActivateLimit;
roomcontroller go = lands[index].GetComponent<roomcontroller>();
go.RoomId = info.Id;
go.ActivateValue = info.Price;
if (info.ActivateCount > 0)
{
for (int temp = info.ActivateCount; temp > 0; temp--)
{
go.OnClick();
}
}
index++;
}

View File

@ -25,15 +25,23 @@ public class scene_jingshadao : MonoBehaviour
int index = 0;
foreach (MinngConfigData info in infos)
{
lands[index].GetComponent<jishadao_contorl>().RoomId = info.Id;
lands[index].GetComponent<jishadao_contorl>().daoyuName.text = info.Name;
jishadao_contorl go = lands[index].GetComponent<jishadao_contorl>();
go.RoomId = info.Id;
go.daoyuName.text = info.Name;
lands[index].GetComponent<jishadao_contorl>().ActivateValue = info.Price;
lands[index].GetComponent<jishadao_contorl>().goldNumerTextPro.text = info.Price.ToString("f0");
lands[index].GetComponent<jishadao_contorl>().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++;
}
}