_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/Battle_Royale/HouseBtn.cs
2024-11-18 17:42:44 +08:00

49 lines
1.3 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HouseBtn : MonoBehaviour
{
public int escapeId;//游戏id
public int roomNo;//房间号
public float roomBeansCoin;//房间里面的钱
public Button btn;
public GameObject Mask;
public RectTransform door;
public GameObject text;
public GameObject post;
public GameObject bg;
public GameObject wn;
//public selectLatest511.GameEscapeRoomResponseVo gameEscapeRoomResponseVo;
public bool DoorIsOpen;
public PlayerMovePos woniuMovePos;
// Start is called before the first frame update
void Start()
{
if (GetComponent<Button>()!= null)
{
btn=GetComponent<Button>();
//btn.onClick.AddListener(OnClickBtn);
}
}
public void OnClickBtn()
{
if (!bg.GetComponent<AllHouseContro>().is_jisha)
{
Debug.Log("————————————————选择房间——————————————");
transform.GetComponent<PlayerMove>().StartMove();
woniuMovePos.HadChoise = true;
}
if (PlayerInfo.instance.HaveBet)
{
BettingBtn.instance.BetAgain();//再次投注,换房子
}
}
}