This commit is contained in:
GL 2024-12-13 16:41:55 +08:00
parent a0dd67aa87
commit c8101d6b1b
5 changed files with 156 additions and 145 deletions

View File

@ -325,98 +325,22 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 435234966}
m_Modifications:
- target: {fileID: 1836779079, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: AniPanel
value:
objectReference: {fileID: 2795579587960038890, guid: 99dd48b22ae2ab94e91528567537b3b8, type: 3}
- target: {fileID: 1836779079, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: MotherFuck531
value:
objectReference: {fileID: 2038721573}
- target: {fileID: 1836779079, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: MotherFuck532
value:
objectReference: {fileID: 2038721572}
- target: {fileID: 2677648104422926017, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2677648104422926017, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2677648104422926017, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_AnchoredPosition.x
value: 686
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2677648104422926017, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_AnchoredPosition.y
value: -600.844
objectReference: {fileID: 0}
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 3
objectReference: {fileID: 0}
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1836779079}
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: ShowAni
objectReference: {fileID: 0}
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: LotteryPanel, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 3
objectReference: {fileID: 0}
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1836779079}
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: ShowAni
objectReference: {fileID: 0}
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: LotteryPanel, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 2677648105853380896, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_Name
value: lotteryPanel
@ -511,19 +435,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2677648105923815896, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2677648105923815896, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2677648105923815896, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_AnchoredPosition.x
value: 686
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2677648105923815896, guid: 125f28881155bef4680416fe0205cd50, type: 3}
propertyPath: m_AnchoredPosition.y
value: -1442.5319
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 125f28881155bef4680416fe0205cd50, type: 3}
@ -616,46 +540,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1836779079 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1836779079, guid: 125f28881155bef4680416fe0205cd50, type: 3}
m_PrefabInstance: {fileID: 748411801}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2038721569}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ff7a0818be562645a2628accc267e42, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2038721569 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2677648105853380896, guid: 125f28881155bef4680416fe0205cd50, type: 3}
m_PrefabInstance: {fileID: 748411801}
m_PrefabAsset: {fileID: 0}
--- !u!114 &2038721572
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2038721569}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fd1d731e1864a324ab2b237426843346, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2038721573
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2038721569}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0e685e61edfafcc4b855c4325090a115, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2110205790
GameObject:
m_ObjectHideFlags: 0

View File

@ -36,9 +36,9 @@ public class Anilottery : MonoBehaviour
.OnStart(() => RewardPanel.transform.DOScale(Vector3.one,1.5f).SetEase(Ease.OutBack)); // 放大到最终大小
RewardPanel.SetActive(true);
}
public void OpenBox(int id )//0是黄1是紫
public void OpenBox(int id )//1是黄2是紫
{
if (id == 0)
if (id == 1)
{
PurpleBox.SetActive(false);
YelloBox.SetActive(true);

View File

@ -10,16 +10,24 @@ public class LotteryPanel : Base
public MotherFuck532 MotherFuck532;
public Lottery532 lottery532;
public MotherFuck533 MotherFuck533;
public bool Judge533;
private void Start()
{
GetRewardInfo532();
}
public void ShowAni(int id)
{
GameObject ani= Instantiate(AniPanel, transform);
ani.GetComponent<Anilottery>().OpenBox(id);
GetRewardInfo533(id);
if (Judge533)
{
GameObject ani = Instantiate(AniPanel, transform);
ani.GetComponent<Anilottery>().OpenBox(id);
}
}
@ -27,6 +35,9 @@ public class LotteryPanel : Base
{
lottery532 = await MotherFuck532.Result();
}
public async void GetRewardInfo533(int id)
{
Judge533 = await MotherFuck533.Result(id);
}
}

View File

@ -1,18 +1,66 @@
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
public class MotherFuck533 : MonoBehaviour
public class MotherFuck533 : Base
{
// Start is called before the first frame update
void Start()
public async Task<bool> Result(int id) //
{
}
// 准备请求的头部信息,包含授权令牌
Dictionary<string, string> head118 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
// 请求体
QueryLottery533Body Body = new QueryLottery533Body
{
lotteryUserId = id
};
// Update is called once per frame
void Update()
{
// 异步发送请求
string response118 = await web.SendRequest(web.URL + "/snail/gameLottery/lotteryOpen", "POST", JsonConvert.SerializeObject(Body), head118);
// 调试输出接收到的响应
Debug.Log("5.3.3宝箱开启 =====================" + "请求体:" + JsonConvert.SerializeObject(Body) + "||返回数据" + response118);
// 将响应反序列化为 KnightRoomList 对象
Lottery533 directlist = JsonConvert.DeserializeObject<Lottery533>(response118);
addEventPopUp(directlist.message);
// 检查反序列化是否成功
if (directlist != null && directlist.data != null)
{
return true;
}
else
{
return false;
}
//Debug.Log(directlist.data.UserResponseVoList.Count);
}
}
public class Lottery533 : Response
{
public int code; // 响应状态码
public string message; // 提示语
public bool? data { get; set; }
}
public class QueryLottery533Body
{
public int lotteryUserId { get; set; }
}

View File

@ -535,9 +535,9 @@ RectTransform:
m_Father: {fileID: 2677648105864033037}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 686, y: -600.844}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1372, y: 841.6879}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &2677648104524646295
@ -981,7 +981,19 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 2677648104760152840}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 1836779079}
m_TargetAssemblyTypeName: LotteryPanel, Assembly-CSharp
m_MethodName: ShowAni
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 2
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &2677648104768877965
GameObject:
m_ObjectHideFlags: 0
@ -2058,7 +2070,19 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 2677648105837977431}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 1836779079}
m_TargetAssemblyTypeName: LotteryPanel, Assembly-CSharp
m_MethodName: ShowAni
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 1
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &2677648105853380896
GameObject:
m_ObjectHideFlags: 0
@ -2071,6 +2095,9 @@ GameObject:
- component: {fileID: 2677648105853380899}
- component: {fileID: 2677648105853380898}
- component: {fileID: 1836779079}
- component: {fileID: 2038721572}
- component: {fileID: 2038721573}
- component: {fileID: 2038721574}
m_Layer: 5
m_Name: lotteryPanel
m_TagString: Untagged
@ -2156,6 +2183,47 @@ MonoBehaviour:
retbutton: {fileID: 0}
ClosureObj: {fileID: 0}
AniPanel: {fileID: 2795579587960038890, guid: 99dd48b22ae2ab94e91528567537b3b8, type: 3}
MotherFuck532: {fileID: 2038721572}
MotherFuck533: {fileID: 2038721574}
Judge533: 0
--- !u!114 &2038721572
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677648105853380896}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fd1d731e1864a324ab2b237426843346, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2038721573
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677648105853380896}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0e685e61edfafcc4b855c4325090a115, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2038721574
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677648105853380896}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 646d90bd3ebef464ba821d5e524fb98c, type: 3}
m_Name:
m_EditorClassIdentifier:
retbutton: {fileID: 0}
ClosureObj: {fileID: 0}
--- !u!1 &2677648105864033036
GameObject:
m_ObjectHideFlags: 0
@ -2542,8 +2610,8 @@ RectTransform:
m_Father: {fileID: 2677648105864033037}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 686, y: -1442.5319}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1372, y: 841.6879}
m_Pivot: {x: 0.5, y: 0.5}