From d392f2ac3b537c24de40df234181d4ed2013b44f Mon Sep 17 00:00:00 2001 From: hyskai <2545507770@qq.com> Date: Wed, 30 Oct 2024 04:35:56 +0800 Subject: [PATCH] add --- meng_yao/Assets/communal/mount.cs | 42 ++++++++++++++++++- .../input_box_pop_up_window.cs | 1 + meng_yao/Assets/script/sys/loading.cs | 2 + 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/meng_yao/Assets/communal/mount.cs b/meng_yao/Assets/communal/mount.cs index 1cc6e18b3..1ad1e5cb9 100644 --- a/meng_yao/Assets/communal/mount.cs +++ b/meng_yao/Assets/communal/mount.cs @@ -65,7 +65,7 @@ public class mount : MonoBehaviour }); } - public void buy_miners()//购买矿工界面 + public void buy_miners()//购买金币矿工界面 { List gameObjects1 = new List(); List boxTypes = new List(); @@ -110,4 +110,44 @@ public class mount : MonoBehaviour }); } + public void buy_zs_miners()//购买砖石矿工界面 + { + List gameObjects1 = new List(); + List boxTypes = new List(); + boxTypes.Add(new BoxType { Name = "矿工1文本", prompt = "矿工1", Type = 4, is_required = true }); + boxTypes.Add(new BoxType { Name = "矿工1", prompt = "矿工1", Type = 3, is_required = true }); + + boxTypes.Add(new BoxType { Name = "矿工1文本", prompt = "矿工1", Type = 4, is_required = true }); + boxTypes.Add(new BoxType { Name = "矿工1", prompt = "矿工1", Type = 3, is_required = true }); + + + boxTypes.Add(new BoxType { Name = "矿工1文本", prompt = "矿工1", Type = 4, is_required = true }); + boxTypes.Add(new BoxType { Name = "矿工1", prompt = "矿工1", Type = 3, is_required = true }); + + + boxTypes.Add(new BoxType { Name = "矿工1文本", prompt = "矿工1", Type = 4, is_required = true }); + boxTypes.Add(new BoxType { Name = "矿工1", prompt = "矿工1", Type = 3, is_required = true }); + + + boxTypes.Add(new BoxType { Name = "矿工1文本", prompt = "矿工1", Type = 4, is_required = true }); + boxTypes.Add(new BoxType { Name = "矿工1", prompt = "矿工1", Type = 3, is_required = true }); + //boxTypes[3] = new BoxType { Name = "submit", textName = " 取消确定 ", Type = 2 }; + GameObject gameObject = add_pop_up(); + gameObject.GetComponent().minHeight = 800;//设置最低高度 + gameObject.GetComponent().setScrollMode(1);//设置滚动模式为滚动 + //gameObject.GetComponent().setScrollMode(0);//设置滚动模式为自动填充 + List gameObjects = gameObject.GetComponent().updateUI(boxTypes, "购买人才");//测试输入框回调处理 + gameObjects[1].GetComponent().register_click(async (BoxType boxType, int type) =>//登录确定或取消 + { + if (type == 0) + { + Debug.Log("====0"); + } + else if (type == 1) + { + Debug.Log("====1"); + } + }); + + } } diff --git a/meng_yao/Assets/communal/ugui/input_box_pop_up_window/input_box_pop_up_window.cs b/meng_yao/Assets/communal/ugui/input_box_pop_up_window/input_box_pop_up_window.cs index f53d7c7c6..c7045d694 100644 --- a/meng_yao/Assets/communal/ugui/input_box_pop_up_window/input_box_pop_up_window.cs +++ b/meng_yao/Assets/communal/ugui/input_box_pop_up_window/input_box_pop_up_window.cs @@ -16,6 +16,7 @@ public class BoxType public bool is_required = false; public string content = ""; public int Type = 0; + public UnityEngine.UI.Image icon = null; } public class input_box_pop_up_window : MonoBehaviour diff --git a/meng_yao/Assets/script/sys/loading.cs b/meng_yao/Assets/script/sys/loading.cs index 33762d4a7..e6dc77203 100644 --- a/meng_yao/Assets/script/sys/loading.cs +++ b/meng_yao/Assets/script/sys/loading.cs @@ -7,7 +7,9 @@ public class loading : MonoBehaviour // Start is called before the first frame update void Start() { + mount.mountitem.login_screen(); + mount.mountitem.buy_zs_miners(); } // Update is called once per frame