Files
MinFt/Client/Assets/Scripts/TravelMap/TravelMapCampReveiwPanel.cs
Liubing\LB 3d8d4d18f3 first commit
先修复一下,错误的场景

删除不必要的钓场资产

修复into场景

update:更新meta文件,修复报错

update:修复资源

修复第一章节建造

修复建造第三章

update:删除多余内容

update:更新README.md

update:还原图标

update:更新README

update:更新配置
2026-04-28 02:17:22 +08:00

64 lines
1.5 KiB
C#

using asap.core;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class TravelMapCampReveiwPanel : MonoBehaviour
{
Button btn_close;
Button btn_left;
Button btn_right;
UIDrag uiDrag;
TMP_Text text_name;
TravelMapCtrl travelMapCtrl;
private void Awake()
{
travelMapCtrl = GContext.container.Resolve<TravelMapCtrl>();
uiDrag = transform.Find("root/drag").GetComponent<UIDrag>();
btn_close = transform.Find("root/btn_close").GetComponent<Button>();
btn_left = transform.Find("root/btn_left").GetComponent<Button>();
btn_right = transform.Find("root/btn_right").GetComponent<Button>();
text_name = transform.Find("root/title/text_title").GetComponent<TMP_Text>();
}
private void Start()
{
btn_close.onClick.AddListener(OnClose);
btn_left.onClick.AddListener(OnLeft);
btn_right.onClick.AddListener(OnRight);
uiDrag.OnBeginDragCall = () =>
{
#if UNITY_EDITOR
if (Input.GetMouseButton(0))
#else
if (Input.touchCount == 1)
#endif
{
GContext.Publish(new SwitchVirtualCameraEvent() { type = 12, isDrag = true });
}
};
}
private void OnLeft()
{
travelMapCtrl.OnLeft();
}
private void OnRight()
{
travelMapCtrl.OnRight();
}
public void SetName(string name)
{
text_name.text = name;
}
private void OnClose()
{
travelMapCtrl.OutVisit();
}
}