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

79 lines
2.1 KiB
C#
Raw Normal View History

2024-11-12 19:43:17 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HouseBtn : MonoBehaviour
{
2024-11-15 23:31:54 +08:00
public int escapeId;//<2F><>Ϸid
public int roomNo;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public float roomBeansCoin;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǯ
2024-11-21 00:04:33 +08:00
public int roomUserNo;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2024-11-12 19:43:17 +08:00
public Button btn;
2024-11-13 02:03:11 +08:00
public GameObject Mask;
2024-11-14 18:11:08 +08:00
public RectTransform door;
2024-11-15 23:31:54 +08:00
public GameObject text;
2024-11-21 00:04:33 +08:00
public GameObject post;//<2F><><EFBFBD>յ<EFBFBD>
2024-11-16 05:56:57 +08:00
public GameObject bg;
public GameObject wn;
2024-11-15 23:31:54 +08:00
//public selectLatest511.GameEscapeRoomResponseVo gameEscapeRoomResponseVo;
2024-11-14 18:11:08 +08:00
public bool DoorIsOpen;
2024-11-18 16:53:39 +08:00
public PlayerMovePos woniuMovePos;
public List<otherWoniu> otherWonius;
public FadeToBlack DarkMask;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
2024-11-23 15:28:39 +08:00
public Image Lightlinp;//<2F><><EFBFBD><EFBFBD><EFBFBD>ƹ<EFBFBD>
2024-11-26 21:36:55 +08:00
public Transform RangTramsForm;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2024-11-12 19:43:17 +08:00
// Start is called before the first frame update
void Start()
{
2024-11-14 18:11:08 +08:00
if (GetComponent<Button>()!= null)
{
btn=GetComponent<Button>();
btn.onClick.AddListener(OnClickBtn);
2024-11-14 18:11:08 +08:00
}
2024-11-13 02:03:11 +08:00
2024-11-12 19:43:17 +08:00
}
2024-11-15 23:31:54 +08:00
public void OnClickBtn()
2024-11-12 19:43:17 +08:00
{
2024-11-21 00:04:33 +08:00
2024-11-21 00:04:33 +08:00
if (PlayerInfo.instance.HaveBet)
{
if (bg.GetComponent<AllHouseContro>().roomNo!=roomNo)
{
bg.GetComponent<AllHouseContro>().roomNo = roomNo;
BettingBtn.instance.BetAgain(() => {
transform.GetComponent<PlayerMove>().StartMove();
woniuMovePos.HadChoise = true;
});//<2F>ٴ<EFBFBD>Ͷע<CDB6><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}
}
else
{
if (bg.GetComponent<AllHouseContro>().roomNo != roomNo)
{
bg.GetComponent<AllHouseContro>().roomNo = roomNo;
transform.GetComponent<PlayerMove>().StartMove();
woniuMovePos.HadChoise = true;
}
2024-11-21 00:04:33 +08:00
}
2024-11-16 05:56:57 +08:00
}
2024-11-18 17:42:44 +08:00
2024-11-21 00:04:33 +08:00
2024-11-13 02:03:11 +08:00
2024-11-12 19:43:17 +08:00
}