This commit is contained in:
hyskai 2024-10-30 04:35:56 +08:00
parent ced9ac01f5
commit d392f2ac3b
3 changed files with 44 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class mount : MonoBehaviour
}); });
} }
public void buy_miners()//¹ºÂò¿ó¹¤½çÃæ public void buy_miners()//购买金币矿工界面
{ {
List<GameObject> gameObjects1 = new List<GameObject>(); List<GameObject> gameObjects1 = new List<GameObject>();
List<BoxType> boxTypes = new List<BoxType>(); List<BoxType> boxTypes = new List<BoxType>();
@ -110,4 +110,44 @@ public class mount : MonoBehaviour
}); });
} }
public void buy_zs_miners()//购买砖石矿工界面
{
List<GameObject> gameObjects1 = new List<GameObject>();
List<BoxType> boxTypes = new List<BoxType>();
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<input_box_pop_up_window>().minHeight = 800;//设置最低高度
gameObject.GetComponent<input_box_pop_up_window>().setScrollMode(1);//设置滚动模式为滚动
//gameObject.GetComponent<input_box_pop_up_window>().setScrollMode(0);//设置滚动模式为自动填充
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "购买人才");//测试输入框回调处理
gameObjects[1].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消
{
if (type == 0)
{
Debug.Log("====0");
}
else if (type == 1)
{
Debug.Log("====1");
}
});
}
} }

View File

@ -16,6 +16,7 @@ public class BoxType
public bool is_required = false; public bool is_required = false;
public string content = ""; public string content = "";
public int Type = 0; public int Type = 0;
public UnityEngine.UI.Image icon = null;
} }
public class input_box_pop_up_window : MonoBehaviour public class input_box_pop_up_window : MonoBehaviour

View File

@ -7,7 +7,9 @@ public class loading : MonoBehaviour
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
mount.mountitem.login_screen(); mount.mountitem.login_screen();
mount.mountitem.buy_zs_miners();
} }
// Update is called once per frame // Update is called once per frame