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

34 lines
688 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HouseBtn : MonoBehaviour
{
public Button btn;
public GameObject Mask;
public RectTransform door;
public bool DoorIsOpen;
// Start is called before the first frame update
void Start()
{
if (GetComponent<Button>()!= null)
{
btn=GetComponent<Button>();
btn.onClick.AddListener(OnClickBtn);
}
}
void OnClickBtn()
{
Debug.Log("µã»÷");
transform.GetComponent<PlayerMove>().StartMove();
PlayerMovePos.instance.HadChoise=true;
}
}