add_pop_up
This commit is contained in:
parent
44524eec82
commit
f9ca408f85
@ -3535,6 +3535,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 616677247}
|
||||
- component: {fileID: 616677246}
|
||||
- component: {fileID: 616677248}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_TagString: Untagged
|
||||
@ -3570,6 +3571,18 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &616677248
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 616677245}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1e00e010e22b19d4f87d0a1463802854, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &620653246
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -44,7 +44,7 @@ public class Item//
|
||||
public List<float> ReferrerBouns;
|
||||
public string CreateDateTime;
|
||||
}
|
||||
public class VoucherItem//返回的代金卷数据
|
||||
public class VoucherItem:Res//返回的代金卷数据
|
||||
{
|
||||
public string Id;
|
||||
public int Num;
|
||||
@ -57,6 +57,26 @@ public class VoucherItem//
|
||||
public float EndureTime;
|
||||
public string CreateDateTime;
|
||||
}
|
||||
|
||||
public class AllVocherItem
|
||||
{
|
||||
public string Id;
|
||||
public string GeneratorId;
|
||||
public string OwnerId;
|
||||
public float Type;
|
||||
public float Num;
|
||||
public bool IsUsed;
|
||||
public bool IsAdmin;
|
||||
public string UsedDateTime;
|
||||
public string CreateDateTime;
|
||||
}
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class AllVocherItemRes : Res {
|
||||
public object Ids;
|
||||
public AllVocherItem[] List;
|
||||
}
|
||||
[Serializable]
|
||||
public class Response : Res//挖矿精灵数据
|
||||
{
|
||||
|
40
meng_yao/Assets/script/ConnactServer/Get_a_voucher.cs
Normal file
40
meng_yao/Assets/script/ConnactServer/Get_a_voucher.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Get_a_voucher : mount
|
||||
{
|
||||
|
||||
List<AllVocherItem> Wakuanglist = new List<AllVocherItem>();
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
|
||||
InvokeRepeating("ExecuteTask", 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
public async void iii()
|
||||
{
|
||||
Login login = new Login();
|
||||
login.Phone = "123";
|
||||
await web.SendRequest(web.URL + "/Player/Login", "POST", JsonUtility.ToJson(login));
|
||||
|
||||
}
|
||||
|
||||
async void ExecuteTask()
|
||||
{
|
||||
string userponse = await web.SendRequest(web.URL + "/Voucher/GetList", "POST");
|
||||
Debug.Log(userponse);
|
||||
AllVocherItemRes itemList = JsonUtility.FromJson<AllVocherItemRes>(userponse);
|
||||
Debug.Log(itemList.List);
|
||||
|
||||
|
||||
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/ConnactServer/Get_a_voucher.cs.meta
Normal file
11
meng_yao/Assets/script/ConnactServer/Get_a_voucher.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e00e010e22b19d4f87d0a1463802854
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -101,12 +101,11 @@ public class JinShaBuy : mount
|
||||
GenerateForFisherElf generateForFisherElf = new GenerateForFisherElf(); // ¹ºÂò¿ó¹¤
|
||||
generateForFisherElf.Num = Num;
|
||||
generateForFisherElf.Count =Convert.ToInt32( boxTypes[1].content);
|
||||
//Debug.Log(generateForFisherElf);
|
||||
string response = await web.SendRequest(web.URL+ "/Voucher/GenerateForMinerElf", "POST", JsonUtility.ToJson(generateForFisherElf));
|
||||
Debug.Log(response);
|
||||
|
||||
|
||||
|
||||
Debug.Log(boxTypes[1].content);
|
||||
// Debug.Log(boxTypes[1].content);
|
||||
//number = int.Parse(boxTypes[0].content);
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class AssestPanel : MonoBehaviour
|
||||
{
|
||||
|
||||
string userponse = await web.SendRequest(web.URL + "/Player/GetInfo", "POST");
|
||||
|
||||
//Debug.Log(userponse.ToString());
|
||||
infopyler res = JsonUtility.FromJson<infopyler>(userponse);
|
||||
SetCoinText(res.Info.Gold);
|
||||
SetStoneText(res.Info.Gem);
|
||||
|
@ -30,10 +30,10 @@ public class jinsha : mount
|
||||
public async void buy_miners()//购买金币矿工界面
|
||||
{
|
||||
|
||||
//测试用
|
||||
Login login = new Login();
|
||||
login.Phone = "1";
|
||||
await web.SendRequest(web.URL + "/Player/Login", "POST", JsonUtility.ToJson(login));
|
||||
////测试用
|
||||
//Login login = new Login();
|
||||
//login.Phone = "1";
|
||||
//await web.SendRequest(web.URL + "/Player/Login", "POST", JsonUtility.ToJson(login));
|
||||
|
||||
Response response = new Response();
|
||||
//关闭摄像头逻辑
|
||||
@ -117,6 +117,13 @@ public class jinsha : mount
|
||||
foreach (GameObject item in gameObjectitems)
|
||||
{
|
||||
item.GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) => {
|
||||
Debug.Log(boxType.customData);
|
||||
if (boxType.customData is BoxData<PlayerData> intData)//通过储存的泛型来查找挖矿精灵对应的item数据
|
||||
{
|
||||
|
||||
PlayerData pldata = intData.GetTypedData();
|
||||
Debug.Log(pldata.Id);
|
||||
}
|
||||
|
||||
List<BoxType> boxTypeser = new List<BoxType>();
|
||||
boxTypeser.Add(new BoxType { Name = "account_number", textName = "二次确定", content = "1.请确认赠送的玩家身份\r\n2.免责声明:\r\n赠送及视为您已同意将该道具赠送于玩家,点击确认按钮后无法取消和撤回.\r\n3.请谨慎操作", Type = 9, is_required = true });
|
||||
|
Loading…
Reference in New Issue
Block a user