_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/Battle_Royale/AllHouseContro.cs

612 lines
21 KiB
C#
Raw Normal View History

2024-11-15 23:31:54 +08:00
using Newtonsoft.Json;
2024-11-14 18:11:08 +08:00
using System.Collections;
using System.Collections.Generic;
2024-11-15 23:31:54 +08:00
using System.Threading.Tasks;
2024-11-19 17:55:35 +08:00
using Unity.VisualScripting;
2024-11-14 18:11:08 +08:00
using UnityEditor;
using UnityEngine;
2024-11-15 23:31:54 +08:00
using UnityEngine.UI;
2024-11-16 02:05:07 +08:00
using UnityEngine.Windows;
2024-11-22 09:49:32 +08:00
using System.Linq;
2024-11-21 00:04:33 +08:00
using static BettingBtn;
using static UnityEditor.Progress;
2024-11-19 17:55:35 +08:00
2024-11-14 18:11:08 +08:00
public class AllHouseContro : MonoBehaviour
{
2024-11-18 18:52:31 +08:00
public PlayerInfo settlementCoinUpdate;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>===================================================================
2024-11-14 18:11:08 +08:00
public List<HouseBtn> HouseBtnList=new List<HouseBtn>();
2024-11-15 23:31:54 +08:00
public int roomNo = -1;
public int escapeId = -1;
2024-11-20 02:41:39 +08:00
public string gameNo;
2024-11-15 23:31:54 +08:00
public GameObject text;
public GameObject detailsText;
public HouseBtn house;
2024-11-16 02:05:07 +08:00
public List<GameObject> bossobj;
2024-11-16 05:56:57 +08:00
public HouseBtn BoosHouse;//Boos<6F><73><EFBFBD><EFBFBD>
public GameObject BazhuPanel;
public WarnPanel warnPanel;
public List<GameObject> wonnius = new List<GameObject>();
2024-11-18 16:53:39 +08:00
public Allother allother;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ
public bool HaveallotherMove;
2024-11-19 17:55:35 +08:00
public List<otherWoniu> otherWoniusList=new List<otherWoniu>();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>б<EFBFBD>
public PlayerMove player;//<2F><><EFBFBD><EFBFBD>
public bool HaveLoad;
2024-11-20 02:41:39 +08:00
public HistoryPanel historyPanel;
2024-11-21 12:03:01 +08:00
public bool IsLoadIn;//<2F>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ
public bool IsHideLoadPanel;//<2F>Ƿ<EFBFBD><C7B7>رռ<D8B1><D5BC><EFBFBD>ҳ<EFBFBD><D2B3>
2024-11-22 09:49:32 +08:00
public List<int> KillNos;//<2F><>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
public ListPanel listPanel;
2024-11-14 18:11:08 +08:00
// Start is called before the first frame update
2024-11-15 23:31:54 +08:00
async void Start()
2024-11-14 18:11:08 +08:00
{
2024-11-15 23:31:54 +08:00
battleRoyaleGameDetails();
2024-11-20 02:41:39 +08:00
GetInfo516();
2024-11-25 14:37:44 +08:00
GetInfo517();
2024-11-26 15:48:20 +08:00
2024-11-15 23:31:54 +08:00
InvokeRepeating("checkOutAllTheEscapeRoomsAsync", 2,2);
2024-11-14 18:11:08 +08:00
}
2024-11-15 23:31:54 +08:00
void OnDestroy()
{
CancelInvoke("checkOutAllTheEscapeRoomsAsync");
}
public async Task ReGet511()
{
Dictionary<string, string> head511 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
string response511 = await web.SendRequest(web.URL + "/snail/gameEscape/queryLatest", "POST", "{}", head511);
Debug.Log("5.1.1<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ" + response511);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
Global.global.response = JsonConvert.DeserializeObject<ServerResponse>(response511);
escapeId = Global.global.response.data.gameEscapeModel.id;
gameNo = Global.global.response.data.gameEscapeModel.gameNo;
int index = 0;
if (Global.global.response.data.gameEscapeRoomResponseVoList.Count>0)
{
foreach (GameEscapeRoomResponseVo item in Global.global.response.data.gameEscapeRoomResponseVoList)
{
if (HouseBtnList[index].roomNo == item.roomNo)
{
HouseBtnList[index].escapeId = item.escapeId;
HouseBtnList[index].roomBeansCoin = item.roomBeansCoin;
}
index++;
//HouseBtnList[index].roomNo = item.roomNo;
//HouseBtn a = HouseBtnList[index];
//HouseBtnList[index].gameObject.GetComponentInChildren<Button>().onClick.AddListener(() => {
// roomNo = item.roomNo;
// Debug.Log("<22><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>Id" + roomNo);
// Debug.Log(a.gameObject.name);
// house = a;
// Debug.Log("=====-----" + item.roomNo.ToString());
//});
}
}
}
2024-11-15 23:31:54 +08:00
public async Task battleRoyaleGameDetails()//5.1.1
{
2024-11-16 16:01:27 +08:00
//foreach (HouseBtn item in HouseBtnList)
//{
// //item.gameObject.GetComponentInChildren<Button>().onClick.RemoveAllListeners();
// //item.gameObject.GetComponentInChildren<Button>().onClick.AddListener(item.OnClickBtn);
// //item.gameObject.GetComponentInChildren<Button>().onClick.AddListener(() => {
// // roomNo = item.roomNo;
2024-11-21 00:04:33 +08:00
// //});
// //item.wn.GetComponent<wuniusj>().show();
//}
2024-11-16 16:01:27 +08:00
2024-11-15 23:31:54 +08:00
Dictionary<string, string> head511 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
2024-11-16 16:01:27 +08:00
2024-11-15 23:31:54 +08:00
string response511 = await web.SendRequest(web.URL + "/snail/gameEscape/queryLatest", "POST", "{}", head511);
Debug.Log("5.1.1<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɱ" + response511);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
2024-11-16 02:05:07 +08:00
Global.global.response = JsonConvert.DeserializeObject<ServerResponse>(response511);
2024-11-15 23:31:54 +08:00
escapeId = Global.global.response.data.gameEscapeModel.id;
2024-11-20 02:41:39 +08:00
gameNo = Global.global.response.data.gameEscapeModel.gameNo;
2024-11-15 23:31:54 +08:00
int index = 0;
if (Global.global.response.data.gameEscapeRoomResponseVoList.Count > 0)
2024-11-15 23:31:54 +08:00
{
foreach (GameEscapeRoomResponseVo item in Global.global.response.data.gameEscapeRoomResponseVoList)
{
if (HouseBtnList[index].roomNo == item.roomNo)
{
HouseBtnList[index].escapeId = item.escapeId;
HouseBtnList[index].roomBeansCoin = item.roomBeansCoin;
}
index++;
//HouseBtnList[index].roomNo = item.roomNo;
//HouseBtn a = HouseBtnList[index];
//HouseBtnList[index].gameObject.GetComponentInChildren<Button>().onClick.AddListener(() => {
// roomNo = item.roomNo;
// Debug.Log("<22><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>Id" + roomNo);
// Debug.Log(a.gameObject.name);
// house = a;
// Debug.Log("=====-----" + item.roomNo.ToString());
//});
}
2024-11-15 23:31:54 +08:00
}
is_jisha_jiesuan = false;
is_jisha = false;
2024-11-19 17:55:35 +08:00
2024-11-21 12:03:01 +08:00
IsLoadIn = true;
//StartCoroutine(LoadPanel.instance.ToHidePanel());
2024-11-15 23:31:54 +08:00
}
public bool is_jisha = false;
public bool is_jisha_jiesuan = false;
2024-11-21 00:04:33 +08:00
public async void ReHouseText()//ˢ<>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ı<EFBFBD>
2024-11-21 00:04:33 +08:00
{
userIDgameId body = new userIDgameId();
2024-11-21 00:04:33 +08:00
body.userId = Global.global.serverResponse.data.userId;
body.escapeId = escapeId;
2024-11-21 00:04:33 +08:00
string response = await web.SendRequest(web.URL + "/snail/gameEscape/queryEscapeRoomList", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
Debug.Log("5.1.2<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>:" + JsonUtility.ToJson(body) + " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ: " + response);
ServerResponse serverResponse = JsonConvert.DeserializeObject<ServerResponse>(response);
//int index = 0;
foreach (var item in serverResponse.data.gameEscapeRoomResponseVoList)
2024-11-21 00:04:33 +08:00
{
foreach (HouseBtn houseBtn in HouseBtnList)
{
if (houseBtn.roomNo == item.roomNo)
{
houseBtn.roomBeansCoin = item.roomBeansCoin;
houseBtn.roomUserNo = item.roomUserNo;
houseBtn.text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
}
}
//if (HouseBtnList.Count > index)
//{
// HouseBtnList[index].text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
//}
//index++;
2024-11-21 00:04:33 +08:00
}
Debug.Log("<22><><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3>");
2024-11-21 00:04:33 +08:00
}
2024-11-15 23:31:54 +08:00
public async void checkOutAllTheEscapeRoomsAsync()//5.1.2
{
2024-11-21 12:03:01 +08:00
2024-11-21 00:04:33 +08:00
//foreach (HouseBtn house in HouseBtnList)
//{
// house.GetComponentInChildren<Button>().onClick.AddListener(() => {
// roomNo = house.roomNo;
// Debug.Log("<22><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>Id" + roomNo);
2024-11-21 00:04:33 +08:00
// });
//}
2024-11-21 00:04:33 +08:00
2024-11-20 02:41:39 +08:00
//GetInfo516();
2024-11-15 23:31:54 +08:00
//Debug.Log("===");
userIDgameId body = new userIDgameId();
body.userId = Global.global.serverResponse.data.userId;
body.escapeId = escapeId;
2024-11-21 00:04:33 +08:00
2024-11-15 23:31:54 +08:00
string response = await web.SendRequest(web.URL+"/snail/gameEscape/queryEscapeRoomList", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
2024-11-20 10:24:18 +08:00
Debug.Log("5.1.2<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>:"+ JsonUtility.ToJson(body) +" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ: " + response);
2024-11-15 23:31:54 +08:00
ServerResponse serverResponse = JsonConvert.DeserializeObject<ServerResponse>(response);
2024-11-21 00:04:33 +08:00
//int index = 0;
2024-11-15 23:31:54 +08:00
foreach (var item in serverResponse.data.gameEscapeRoomResponseVoList){
2024-11-21 00:04:33 +08:00
foreach (HouseBtn houseBtn in HouseBtnList)
2024-11-20 10:24:18 +08:00
{
2024-11-21 00:04:33 +08:00
if (houseBtn.roomNo==item.roomNo)
{
houseBtn.roomBeansCoin = item.roomBeansCoin;
2024-11-21 12:03:01 +08:00
houseBtn.roomUserNo = item.roomUserNo;
2024-11-21 00:04:33 +08:00
houseBtn.text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
}
2024-11-20 10:24:18 +08:00
}
2024-11-21 00:04:33 +08:00
//if (HouseBtnList.Count > index)
//{
// HouseBtnList[index].text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
//}
2024-11-20 10:24:18 +08:00
2024-11-21 00:04:33 +08:00
//index++;
2024-11-15 23:31:54 +08:00
}
2024-11-19 17:55:35 +08:00
Debug.Log("<22><><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3>");
2024-11-15 23:31:54 +08:00
if(serverResponse.data.carrySeconds == -1)
{
2024-11-21 09:38:16 +08:00
//OtherBack();
2024-11-19 17:55:35 +08:00
2024-11-19 17:55:35 +08:00
detailsText.GetComponentInChildren<Text>().text = "";//<2F><>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD>
2024-11-15 23:31:54 +08:00
battleRoyaleGameDetails();
roomNo = -1;//<2F><><EFBFBD>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD>Ÿ<EFBFBD>ΪĬ<CEAA><C4AC>-1
2024-11-19 17:55:35 +08:00
LoadPanel.instance.ShowPanel();
2024-11-23 15:28:39 +08:00
CanMoveWoniu();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ƶ<EFBFBD>
ClearText();
//ReHouseText();
BoosReturn();
2024-11-23 15:28:39 +08:00
ReturnDarkToWhite();//<2F>ָ<EFBFBD><D6B8>ƹ<EFBFBD>
player.gameObject.SetActive(true);
player.ReturnStartPos();
2024-11-22 12:15:36 +08:00
allother.HideJiaWoniu();
// allother.Reflash();//<2F><><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD>
2024-11-21 12:03:01 +08:00
allother.ClearAllWoniu();
CloseBoosDoor(BoosHouse);
2024-11-21 12:03:01 +08:00
IsHideLoadPanel = false;
2024-11-20 02:41:39 +08:00
GetInfo516();
2024-11-25 14:37:44 +08:00
GetInfo517();
2024-11-26 15:48:20 +08:00
ListPanel.instance.ShowPanels();
GetInfo518();
ListPanel.instance.UpdatePanels();
2024-11-21 00:04:33 +08:00
PlayerInfo.instance.AllBetCoins = 0;//Ͷע<CDB6><D7A2>0
2024-11-15 23:31:54 +08:00
}
else if (serverResponse.data.carrySeconds < 45){
2024-11-21 12:03:01 +08:00
if (IsLoadIn && !IsHideLoadPanel&& serverResponse.data.carrySeconds <38)//<2F>رռ<D8B1><D5BC><EFBFBD>ҳ<EFBFBD><D2B3>
{
LoadPanel.instance.HidePanel();
IsHideLoadPanel = true;
HaveallotherMove = false;
}
2024-11-19 17:55:35 +08:00
//ClearBoosHouseId();//<2F><><EFBFBD><EFBFBD>boos<6F><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2024-11-16 02:24:44 +08:00
ControAllDoorOpen();
2024-11-18 17:42:44 +08:00
text.GetComponentInChildren<Text>().text = (45 - serverResponse.data.carrySeconds).ToString();
2024-11-15 23:31:54 +08:00
detailsText.GetComponentInChildren<Text>().text = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
await Task.Delay(1000);
2024-11-18 17:42:44 +08:00
text.GetComponentInChildren<Text>().text = (45 - serverResponse.data.carrySeconds - 1).ToString();
2024-11-15 23:31:54 +08:00
2024-11-18 16:53:39 +08:00
allother.startIEmove();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ
//if (!HaveallotherMove)
//{
// //StartCoroutine(allother.IECreateWoniu());
2024-11-21 12:03:01 +08:00
// HaveallotherMove = true;
// //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//}
2024-11-18 16:53:39 +08:00
2024-11-15 23:31:54 +08:00
}
else if (serverResponse.data.carrySeconds > 45 && serverResponse.data.carrySeconds < 50)
{
StopWoniu();
2024-11-16 02:24:44 +08:00
ControAllDoorClose();//<2F><><EFBFBD><EFBFBD>
2024-11-16 05:56:57 +08:00
OpenBoosDoor(BoosHouse);//boos<6F><73><EFBFBD><EFBFBD>
2024-11-15 23:31:54 +08:00
text.GetComponentInChildren<Text>().text = "";
2024-11-19 17:55:35 +08:00
detailsText.GetComponentInChildren<Text>().text = "";//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2024-11-15 23:31:54 +08:00
if (!is_jisha){
is_jisha = true;
2024-11-16 05:56:57 +08:00
warnPanel.ShowPanel();
2024-11-18 16:53:39 +08:00
await Task.Delay(3000);
2024-11-16 05:56:57 +08:00
warnPanel.HidePanel();
2024-11-15 23:31:54 +08:00
response = await web.SendRequest(web.URL + "/snail/gameEscape/queryKill", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
2024-11-26 14:07:07 +08:00
Debug.Log("5.1.4: " + response);
2024-11-16 02:05:07 +08:00
ServerResponse514 serverResponse_514 = JsonConvert.DeserializeObject<ServerResponse514>(response);
2024-11-15 23:41:28 +08:00
2024-11-16 02:05:07 +08:00
string[] parts = serverResponse_514.data.roomNoKill.Split(","); // <20><><EFBFBD><EFBFBD> ',' <20>ָ<EFBFBD><D6B8>ַ<EFBFBD><D6B7><EFBFBD>d
2024-11-22 09:49:32 +08:00
KillNos = parts.Select(int.Parse).ToList();
2024-11-26 17:47:32 +08:00
//int index_ = 0;
int a = 0;
foreach (int index in KillNos)
{
if (index!=0&&a<=bossobj.Count)
2024-11-16 02:05:07 +08:00
{
2024-11-26 17:47:32 +08:00
bossobj[a].GetComponent<BossContro>().BossMove(index);
bossobj[a].GetComponent<PlayerMove>().room_id = index.ToString();
a++;
2024-11-16 05:56:57 +08:00
}
2024-11-16 02:05:07 +08:00
}
2024-11-26 17:47:32 +08:00
//foreach (string part in parts) {
// if (parts.Length > index_)
// {
// int a = 0;
// foreach (HouseBtn item in HouseBtnList)
// {
// if (a == int.Parse(parts[index_])) {
// bossobj[index_].GetComponent<BossContro>().BossMove(int.Parse(parts[index_]));
// bossobj[index_].GetComponent<PlayerMove>().room_id = parts[index_];
// }
// a++;
// }
// index_++;
// }
// else
// {
// Debug.Log("sdsdsdssssssssssssssss" + parts.Length);
// }
//}
2024-11-22 09:27:28 +08:00
2024-11-19 17:55:35 +08:00
//<2F><>ɱˢ<C9B1>·<EFBFBD><C2B7>
//checkOutAllTheEscapeRoomsAsync();
2024-11-15 23:31:54 +08:00
}
}
2024-11-19 17:55:35 +08:00
else if (serverResponse.data.carrySeconds > 56) {
2024-11-19 17:55:35 +08:00
ClearBoosHouseId();////
2024-11-15 23:31:54 +08:00
text.GetComponentInChildren<Text>().text = "";
2024-11-19 17:55:35 +08:00
detailsText.GetComponentInChildren<Text>().text = "";//<2F><><EFBFBD><EFBFBD>
2024-11-18 17:02:12 +08:00
2024-11-18 16:53:39 +08:00
PlayerInfo.instance.AllBetCoins = 0;//Ͷע<CDB6><D7A2>0
PlayerInfo.instance.SelfWoniuText.text= PlayerInfo.instance.AllBetCoins.ToString();
2024-11-18 17:02:12 +08:00
PlayerInfo.instance.HaveBet=false;
2024-11-18 16:53:39 +08:00
2024-11-21 12:03:01 +08:00
2024-11-19 17:55:35 +08:00
2024-11-15 23:31:54 +08:00
if (!is_jisha_jiesuan)
{
is_jisha_jiesuan = true;
response = await web.SendRequest(web.URL + "/snail/gameEscape/queryUserBetResult", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
Debug.Log("5.1.5: " + response);
2024-11-16 05:56:57 +08:00
ServerResponse515 serverResponse_515 = JsonConvert.DeserializeObject<ServerResponse515>(response);
2024-11-16 05:56:57 +08:00
if (serverResponse_515.data==null)
{
Debug.Log("5.1.5:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>");
}
else
{
2024-11-19 17:55:35 +08:00
2024-11-16 05:56:57 +08:00
switch (serverResponse_515.data.outcome)
{
case 0:
Debug.Log(<>н<EFBFBD><D0BD><EFBFBD>");
2024-11-19 17:55:35 +08:00
//BoosReturn();
2024-11-16 05:56:57 +08:00
break;
case 1:
SucceePanel.instance.textSnailEggs.text =serverResponse_515.data.beansCoin.ToString();
2024-11-16 05:56:57 +08:00
SucceePanel.instance.ShowPanel();
//Debug.Log("ʤ<><CAA4>");
//BoosReturn();
2024-11-16 05:56:57 +08:00
break;
case 2:
FailPanel.instance.textIchor.text=serverResponse_515.data.ichorCoin.ToString();
2024-11-16 05:56:57 +08:00
FailPanel.instance.ShowPanel();
//Debug.Log("ʧ<><CAA7>");
//BoosReturn();
2024-11-16 05:56:57 +08:00
break;
}
2024-11-18 18:52:31 +08:00
settlementCoinUpdate.QueryPlayerInfo();
2024-11-19 17:55:35 +08:00
2024-11-18 18:52:31 +08:00
Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>===============================================" + settlementCoinUpdate.Money);
2024-11-16 05:56:57 +08:00
}
2024-11-15 23:31:54 +08:00
}
}
}
2024-11-20 02:41:39 +08:00
public async void GetInfo516()
{
string response = await web.SendRequest(web.URL + "/snail/gameEscape/queryLatestRecord", "POST", null, Global.global.CreateHeaders());
Debug.Log("5.1.6: " + response);
ServerResponse516 serverResponse_516 = JsonConvert.DeserializeObject<ServerResponse516>(response);
Debug.Log(serverResponse_516.data.gameEscapeRoomKillCountResponseVoList[0].roomNo+"sdsdddddddddddddddddddddddddddddddd");
foreach (gameEscapeRoomKillCountResponseVo item in serverResponse_516.data.gameEscapeRoomKillCountResponseVoList)
{
historyPanel.SetKilledText(item);
}
//historyPanel.SetKilledText(serverResponse_516.data.gameEscapeRoomKillCountResponseVoList);
foreach (gameEscapeModel item in serverResponse_516.data.gameEscapeModelList)
{
if (item.gameNo == gameNo)
{
historyPanel.SetKillHouse(item);
}
}
}
2024-11-25 14:37:44 +08:00
public async void GetInfo517()
{
userIDgameId body = new userIDgameId();
body.userId = Global.global.serverResponse.data.userId;
body.orderByDesc = 1;
string response = await web.SendRequest(web.URL + "/snail/gameEscape/queryUserRecord", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
Debug.Log("5.1.7: " + response);
ServerResponse517 serverResponse_517 = JsonConvert.DeserializeObject<ServerResponse517>(response);
historyPanel.throwEggText.text = serverResponse_517.data.beansCoinBet.ToString();
historyPanel.getEggText.text = serverResponse_517.data.beansCoinWin.ToString();
2024-11-25 15:57:15 +08:00
historyPanel.CreateJournalPanel(serverResponse_517.data.gameEscapeUserRecordResponseVoPageResult.dataList);
2024-11-25 14:37:44 +08:00
}
2024-11-25 21:25:28 +08:00
public async void GetInfo518(int flag=0)//0<><30><EFBFBD>죬1<ECA3AC><31><EFBFBD><EFBFBD>
{
Body518 body = new Body518();
body.userId = Global.global.serverResponse.data.userId;
2024-11-26 15:48:20 +08:00
body.dayType = flag;
2024-11-25 21:25:28 +08:00
string response = await web.SendRequest(web.URL + "/snail/gameEscape/queryUserBetRankByDay", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
Debug.Log("5.1.8: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"+ JsonUtility.ToJson(body)+"<22><><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD>"+ response);
ServerResponse518 serverResponse_518 = JsonConvert.DeserializeObject<ServerResponse518>(response);
2024-11-26 15:48:20 +08:00
if (flag==0)
{
listPanel.CreateListItem(serverResponse_518.data.gameEscapeUserBetResponseVoList, listPanel.CreateParentToDay);
}
else
{
listPanel.CreateListItem(serverResponse_518.data.gameEscapeUserBetResponseVoList, listPanel.CreateParentLastDay,flag);
}
listPanel.SetSelfList(serverResponse_518.data.userBetInfo,flag);
2024-11-25 21:25:28 +08:00
2024-11-25 14:37:44 +08:00
2024-11-25 21:25:28 +08:00
}
2024-11-20 02:41:39 +08:00
2024-11-26 15:48:20 +08:00
2024-11-19 17:55:35 +08:00
public void OtherBack()
{
foreach (otherWoniu item in otherWoniusList)
{
item.BackWait();
Debug.Log("other<65><72>ȥ");
}
}
public void StopWoniu()//<2F><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD>
{
foreach (HouseBtn item in HouseBtnList)
{
item.gameObject.GetComponentInChildren<Button>().enabled=false;
}
}
public void CanMoveWoniu()//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD>
{
foreach (HouseBtn item in HouseBtnList)
{
item.gameObject.GetComponentInChildren<Button>().enabled=true;
}
}
2024-11-19 17:55:35 +08:00
public void ClearBoosHouseId()
2024-11-16 05:56:57 +08:00
{
foreach (GameObject item in bossobj)//Boos<6F><73>ȥ
{
2024-11-19 17:55:35 +08:00
item.transform.GetComponent<BossContro>().HouseId = -1;
}
}
public async void BoosReturn()
{
foreach (GameObject item in bossobj)//Boos<6F><73>ȥ
{
await Task.Delay(100);
2024-11-16 05:56:57 +08:00
item.GetComponent<BossContro>().ReturnParent();
2024-11-19 17:55:35 +08:00
2024-11-16 05:56:57 +08:00
}
}
2024-11-14 18:11:08 +08:00
public void ControAllDoorOpen()
{
for (int i=0;i<HouseBtnList.Count;i++)
{
if (!HouseBtnList[i].DoorIsOpen)
{
Tools.MoveUpOrDwon(HouseBtnList[i].door,270);
HouseBtnList[i].DoorIsOpen = true;
}
}
}
public void ControAllDoorClose()
{
for (int i = 0; i < HouseBtnList.Count; i++)
{
if (HouseBtnList[i].DoorIsOpen)
{
Tools.MoveUpOrDwon(HouseBtnList[i].door, -270);
HouseBtnList[i].DoorIsOpen = false;
}
}
}
public void ControOneDoorOpen(int id,System.Action onComplete = null)
{
Tools.MoveUpOrDwon(HouseBtnList[id-1].door, 270,onComplete);
HouseBtnList[id-1].DoorIsOpen = true;
}
public void ControOneDoorClose(int id, System.Action onComplete = null)
{
Tools.MoveUpOrDwon(HouseBtnList[id - 1].door, -270, onComplete);
HouseBtnList[id - 1].DoorIsOpen = false;
}
2024-11-16 05:56:57 +08:00
public void OpenBoosDoor(HouseBtn boosHouse)
{
if (!boosHouse.DoorIsOpen)
{
Tools.MoveUpOrDwon(boosHouse.door, 270);
boosHouse.DoorIsOpen = true;
}
}
public void CloseBoosDoor(HouseBtn boosHouse)
{
if (boosHouse.DoorIsOpen)
{
Tools.MoveUpOrDwon(boosHouse.door, -270);
boosHouse.DoorIsOpen = false;
}
}
public void ClearText()//<2F><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>
{
foreach (HouseBtn houseBtn in HouseBtnList)
{
houseBtn.text.GetComponentInChildren<TextBox>().SetText(0);
}
}
2024-11-23 15:28:39 +08:00
public void ReturnDarkToWhite()//<2F>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
{
foreach (HouseBtn houseBtn in HouseBtnList)
{
houseBtn.DarkMask.ReturnWhite();
//houseBtn.Lightlinp.color = new Color(0, 0, 0, 1);
}
}
2024-11-14 18:11:08 +08:00
}