小修改,弹窗遮罩bug

This commit is contained in:
GL 2024-12-13 19:37:33 +08:00
parent 4d7e609f52
commit f8bfc5c724
11 changed files with 132 additions and 55 deletions

View File

@ -1906,4 +1906,4 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u6BCF\u65E5\u89C2\u770B4\u6B21\u5E7F\u544A\u5373\u53EF\u83B7\u5F97\u8717\u820D<color=red><b><size=70>100%</size></b></color>\u4EA7\u51FA"
m_Text: "\u6BCF\u65E5\u70B9\u51FB4\u6B21\u53EF\u83B7\u5F97\u8717\u820D\n<color=red><b><size=70>100%</size></b></color>\u4EA7\u51FA"

View File

@ -8891,7 +8891,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u8717\u5C45"
m_text: "\u8717\u820D"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: fddecc6d8f3ae694dbc1d9d828cb12e3, type: 2}
m_sharedMaterial: {fileID: -5950493476346735654, guid: fddecc6d8f3ae694dbc1d9d828cb12e3, type: 2}

View File

@ -1,7 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class LotteryPanel : Base
{
public GameObject AniPanel;
@ -13,6 +13,14 @@ public class LotteryPanel : Base
public MotherFuck533 MotherFuck533;
public bool Judge533;
public TextMeshProUGUI lowNumText;//普通宝箱
public int lowNum;
public int goodNum;
public TextMeshProUGUI goodNumText;//高级宝箱
public List<Lottery532Data> lowList=new List<Lottery532Data>();//普通宝箱列表
public List<Lottery532Data> goodList = new List<Lottery532Data>();//高级宝箱列表
private void Start()
{
@ -21,12 +29,45 @@ public class LotteryPanel : Base
}
public void ShowAni(int id)
{
GetRewardInfo533(id);
if (Judge533)
if (id==1)
{
GameObject ani = Instantiate(AniPanel, transform);
ani.GetComponent<Anilottery>().OpenBox(id);
if (lowList.Count>0)
{
GetRewardInfo533(lowList[0].id);
if (true)
{
lowList.Remove(lowList[0]);
GameObject ani = Instantiate(AniPanel, transform);
ani.GetComponent<Anilottery>().OpenBox(id);
}
}
else
{
addEventPopUp("没有宝箱");
}
}
else if (id == 2)
{
if (goodList.Count>0)
{
GetRewardInfo533(goodList[0].id);
if (Judge533)
{
goodList.Remove(goodList[0]);
GameObject ani = Instantiate(AniPanel, transform);
ani.GetComponent<Anilottery>().OpenBox(id);
}
}
else
{
addEventPopUp("没有宝箱");
}
}
}
@ -34,10 +75,38 @@ public class LotteryPanel : Base
public async void GetRewardInfo532()
{
lottery532 = await MotherFuck532.Result();
SetMyBoxNum(lottery532.data);
}
public async void GetRewardInfo533(int id)
{
Judge533 = await MotherFuck533.Result(id);
if (Judge533)
{
GetRewardInfo532();
}
}
public void SetMyBoxNum(List<Lottery532Data> data)//设置我的宝箱
{
lowList.Clear();
goodList.Clear();
foreach (Lottery532Data item in data)
{
if (item.lotteryId==1)
{
lowList.Add(item);
}
else if (item.lotteryId == 2)
{
goodList.Add(item);
}
}
lowNumText.text = lowList.Count.ToString();
goodNumText.text = goodList.Count.ToString();
}
}

View File

@ -56,20 +56,23 @@ public class QueryLottery532Body
public class Lottery532 : Response
{
public List<Lottery531Data> data { get; set; }
public List<Lottery532Data> data { get; set; }
}
public class Lottery532Data
{
public int Id { get; set; }
public int LotteryId { get; set; }
public int Type { get; set; }
public decimal BeansCoin { get; set; }
public int RateSurface { get; set; }
public int RateActual { get; set; }
public int Status { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
public int id { get; set; }
public int lotteryId { get; set; }
public int source { get; set; }
public int userId { get; set; }
public int status { get; set; }
public double beansCoinOpen { get; set; }
public double beansCoinReward { get; set; }
public int type { get; set; }
public int snailId { get; set; }
public int slotId { get; set; }
public DateTime createTime { get; set; }
public DateTime updateTime { get; set; }
}

View File

@ -34,7 +34,7 @@ public class MotherFuck533 : Base
addEventPopUp(directlist.message);
// 检查反序列化是否成功
if (directlist != null && directlist.data != null)
if (directlist.code==200)
{
return true;
@ -53,7 +53,7 @@ public class Lottery533 : Response
{
public int code; // 响应状态码
public string message; // 提示语
public bool? data { get; set; }
//public bool? data { get; set; }
}

View File

@ -817,10 +817,10 @@ RectTransform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1372, y: 2436}
m_SizeDelta: {x: 292, y: 36}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8503404559117813738
CanvasRenderer:

View File

@ -417,7 +417,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677648104417894384}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
@ -430,7 +430,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 99
m_text: 0
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 5214a01544a3d6744bbbe3653d4662f3, type: 2}
m_sharedMaterial: {fileID: -5950493476346735654, guid: 5214a01544a3d6744bbbe3653d4662f3, type: 2}
@ -606,7 +606,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 99
m_text: 0
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 5214a01544a3d6744bbbe3653d4662f3, type: 2}
m_sharedMaterial: {fileID: -5950493476346735654, guid: 5214a01544a3d6744bbbe3653d4662f3, type: 2}
@ -2186,6 +2186,10 @@ MonoBehaviour:
MotherFuck532: {fileID: 2038721572}
MotherFuck533: {fileID: 2038721574}
Judge533: 0
lowNumText: {fileID: 2677648104417894386}
lowNum: 0
goodNum: 0
goodNumText: {fileID: 2677648104524646289}
--- !u!114 &2038721572
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -2152,7 +2152,7 @@ MonoBehaviour:
id: {fileID: 7440098880401058131}
bindtime: {fileID: 8608830216116307115}
AvaterImage: {fileID: 8197978441176617509}
trans: {fileID: 6661102261700243289}
trans: {fileID: 7365734032093996524}
editBtn: {fileID: 3317031098697572181}
myorderBtn: {fileID: 2761721410439307699}
realnameBtn: {fileID: 5878039117792475984}
@ -3399,7 +3399,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u6700\u5F3A\u8717\u725B\u5DF2\u8FD0\u884C"
m_Text: "\u5947\u8FF9\u8717\u725B\u5DF2\u8FD0\u884C"
--- !u!1 &6093851798494486517
GameObject:
m_ObjectHideFlags: 0

View File

@ -31,12 +31,12 @@ RectTransform:
- {fileID: 5797952350798532522}
- {fileID: 5797952351703188415}
- {fileID: 5797952351688055029}
m_Father: {fileID: 7280502856680181091}
m_RootOrder: 3
m_Father: {fileID: 7280502856939663039}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.82735014, y: 126.38623}
m_AnchoredPosition: {x: -0.00325346, y: -0.48388672}
m_SizeDelta: {x: 1181.5, y: 1063.3503}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5797952350011681722
@ -1794,18 +1794,18 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7280502856037556148}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7280502857132279049}
m_Father: {fileID: 7280502856680181091}
m_RootOrder: 4
m_Father: {fileID: 7280502856939663039}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: -0.83575, y: 647.57}
m_AnchoredPosition: {x: -0.011653304, y: 183.14758}
m_SizeDelta: {x: 1181.5, y: 330.29}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &7280502856550628753
@ -1918,9 +1918,6 @@ RectTransform:
m_Children:
- {fileID: 1730923064677901686}
- {fileID: 7280502856939663039}
- {fileID: 7280502857366471291}
- {fileID: 5797952349962396688}
- {fileID: 7280502856037556155}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -2011,7 +2008,10 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 7280502857366471291}
- {fileID: 5797952349962396688}
- {fileID: 7280502856037556155}
m_Father: {fileID: 7280502856680181091}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -2215,19 +2215,19 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7280502857366471284}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7280502856550628752}
- {fileID: 7280502857663289970}
m_Father: {fileID: 7280502856680181091}
m_RootOrder: 2
m_Father: {fileID: 7280502856939663039}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 5.0154, y: -444}
m_AnchoredPosition: {x: 5.8394966, y: -233.31787}
m_SizeDelta: {x: 920.55, y: 193.2655}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &7280502857663289971

View File

@ -256,6 +256,7 @@ MonoBehaviour:
moveDirection: {x: 0, y: 0, z: 0}
animator: {fileID: 334222049048065342}
id: 0
Image: {fileID: 0}
--- !u!95 &334222049048065342
Animator:
serializedVersion: 5
@ -391,9 +392,9 @@ RectTransform:
m_Father: {fileID: 5909292345239580933}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1014.33997, y: -292.26154}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 336, y: 436}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &894324158840003883
@ -1165,9 +1166,9 @@ RectTransform:
m_Father: {fileID: 5909292345239580933}
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: 609.17, y: -292.26154}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 336, y: 436}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &894324159581149361
@ -3657,9 +3658,9 @@ RectTransform:
m_Father: {fileID: 5909292345239580933}
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: 204, y: -292.26154}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 336, y: 436}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5909292345778024438

View File

@ -171,10 +171,10 @@ RectTransform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 6.8880005, y: 124.23}
m_SizeDelta: {x: 1186.3, y: 1732.8}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4499171977774247268
CanvasRenderer: