备份CatanBuilding瘦身独立工程
This commit is contained in:
38
Assets/Scripts/TravelMap/TravelMapCampPhotoPanel.cs
Normal file
38
Assets/Scripts/TravelMap/TravelMapCampPhotoPanel.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using asap.core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TravelMapCampPhotoPanel : MonoBehaviour
|
||||
{
|
||||
Button btn_photo;
|
||||
UIDrag uiDrag;
|
||||
TravelMapPhotoPanel travelMapPhotoPanel;
|
||||
private void Awake()
|
||||
{
|
||||
btn_photo = transform.Find("root/btn_photo").GetComponent<Button>();
|
||||
uiDrag = transform.Find("root/drag").GetComponent<UIDrag>();
|
||||
travelMapPhotoPanel = transform.Find("TravelMapPhotoPanel").GetComponent<TravelMapPhotoPanel>();
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
btn_photo.onClick.AddListener(OnCaptureFishPhoto);
|
||||
uiDrag.OnBeginDragCall = () =>
|
||||
{
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (Input.GetMouseButton(0))
|
||||
#else
|
||||
if (Input.touchCount == 1)
|
||||
#endif
|
||||
{
|
||||
GContext.Publish(new SwitchVirtualCameraEvent() { type = 12, isDrag = true });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void OnCaptureFishPhoto()
|
||||
{
|
||||
travelMapPhotoPanel.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user