投注修改

This commit is contained in:
GL 2024-11-18 17:42:44 +08:00
parent 343bf1de25
commit d95ce828ba
5 changed files with 31 additions and 14 deletions

View File

@ -1800,6 +1800,7 @@ MonoBehaviour:
warnPanel: {fileID: 1807910154} warnPanel: {fileID: 1807910154}
wonnius: [] wonnius: []
allother: {fileID: 716344324} allother: {fileID: 716344324}
HaveallotherMove: 0
is_jisha: 0 is_jisha: 0
is_jisha_jiesuan: 0 is_jisha_jiesuan: 0
--- !u!114 &142654724 --- !u!114 &142654724
@ -2182,7 +2183,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Money: 1000 Money: 1000
AllBetCoins: 0 AllBetCoins: 0
SelfWoniuText: {fileID: 0} SelfWoniuText: {fileID: 1046374311}
HaveBet: 0
--- !u!1 &197030554 --- !u!1 &197030554
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -104,10 +104,10 @@ public class AllHouseContro : MonoBehaviour
} }
else if (serverResponse.data.carrySeconds < 45){ else if (serverResponse.data.carrySeconds < 45){
ControAllDoorOpen(); ControAllDoorOpen();
text.GetComponentInChildren<Text>().text = (60 - serverResponse.data.carrySeconds).ToString(); text.GetComponentInChildren<Text>().text = (45 - serverResponse.data.carrySeconds).ToString();
detailsText.GetComponentInChildren<Text>().text = "秒后霸主出现"; detailsText.GetComponentInChildren<Text>().text = "秒后霸主出现";
await Task.Delay(1000); await Task.Delay(1000);
text.GetComponentInChildren<Text>().text = (60 - serverResponse.data.carrySeconds - 1).ToString(); text.GetComponentInChildren<Text>().text = (45 - serverResponse.data.carrySeconds - 1).ToString();
if (!HaveallotherMove) if (!HaveallotherMove)

View File

@ -70,7 +70,19 @@ public class BettingBtn : MonoBehaviour
bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails(); bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
} }
public async void BetAgain()
{
RequestData body = new RequestData();
body.escapeId = bg.GetComponentInChildren<AllHouseContro>().escapeId;
body.bet = PlayerInfo.instance.AllBetCoins;
body.roomNo = bg.GetComponentInChildren<AllHouseContro>().roomNo;
body.userId = Global.global.serverResponse.data.userId;
string response = await web.SendRequest(web.URL + "/snail/gameEscape/userBet", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
Debug.Log("Óû§ÏÂ×¢ÏìÓ¦: " + response);
bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
}
void SetBet() void SetBet()
{ {

View File

@ -38,8 +38,11 @@ public class HouseBtn : MonoBehaviour
transform.GetComponent<PlayerMove>().StartMove(); transform.GetComponent<PlayerMove>().StartMove();
woniuMovePos.HadChoise = true; woniuMovePos.HadChoise = true;
} }
if (PlayerInfo.instance.HaveBet)
{
BettingBtn.instance.BetAgain();//再次投注,换房子
}
} }
} }

View File

@ -85,18 +85,18 @@ public class logoPanel : MonoBehaviour
public async void OnClickLoginBtnAsync() public async void OnClickLoginBtnAsync()
{ {
//loginbody body = new loginbody
//{
// userName = userNameField.text,
// password = passwordField.text,
// verifyCode = int.Parse(verifyCodeField.text)
//};
loginbody body = new loginbody loginbody body = new loginbody
{ {
userName = "15151658596", userName = userNameField.text,
password = "123456", password = passwordField.text,
verifyCode = 111111 verifyCode = int.Parse(verifyCodeField.text)
}; };
//loginbody body = new loginbody
//{
// userName = "15151658596",
// password = "123456",
// verifyCode = 111111
//};
string loginResponse = await web.SendRequest(web.URL+"/snail/user/login", "POST", JsonUtility.ToJson(body)); string loginResponse = await web.SendRequest(web.URL+"/snail/user/login", "POST", JsonUtility.ToJson(body));
ServerResponse response = JsonUtility.FromJson<ServerResponse>(loginResponse); ServerResponse response = JsonUtility.FromJson<ServerResponse>(loginResponse);
if (response != null && response.code == 200 && response.data != null) if (response != null && response.code == 200 && response.data != null)