2024-11-12 19:43:17 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class HouseBtn : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
public bool DoorIsOpen;
|
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-13 02:03:11 +08:00
|
|
|
|
|
2024-11-12 19:43:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OnClickBtn()
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("<22><><EFBFBD><EFBFBD>");
|
|
|
|
|
transform.GetComponent<PlayerMove>().StartMove();
|
2024-11-13 02:03:11 +08:00
|
|
|
|
PlayerMovePos.instance.HadChoise=true;
|
2024-11-13 18:01:18 +08:00
|
|
|
|
|
2024-11-13 02:03:11 +08:00
|
|
|
|
|
2024-11-12 19:43:17 +08:00
|
|
|
|
}
|
|
|
|
|
}
|