比赛;编辑页面
This commit is contained in:
1 parent
85130ce6c3
commit
3ec6fd0569
56 files changed
+16371
-2749
No files matched your search
@@ -110,9 +110,11 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
tabContainer.Find("3d").gameObject.SetActive(myMap.Enable3D);
|
||||
tabContainer.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImage(myMap.CountryCode);
|
||||
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(Collect);
|
||||
transform.Find("CollectImg").gameObject.SetActive(false);
|
||||
transform.Find("CollectImg").Find("Image").GetComponent<Image>().sprite =
|
||||
UIManager.Instance.collectDict[myMap.IsFavorite];
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
transform.Find("CollectImg").gameObject.SetActive(false);
|
||||
#endif
|
||||
transform.Find("BtnInfo").GetComponent<Button>().onClick.AddListener(Info);
|
||||
transform.Find("BtnRide").GetComponent<Button>().onClick.AddListener(Ride);
|
||||
|
||||
@@ -141,8 +143,23 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
UIManager.ShowMapDetailPanel(map.Id);
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
if (localY != null)
|
||||
{
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
}
|
||||
transform.Find("CollectImg").gameObject.SetActive(false);
|
||||
transform.Find("Shadow").gameObject.SetActive(false);
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
//SetActive4Button(false);
|
||||
SetColor(false);
|
||||
#endif
|
||||
}
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
if (localY == null)
|
||||
{
|
||||
localY = transform.localPosition.y;
|
||||
@@ -153,6 +170,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
Cursor.SetCursor(Resources.Load<Texture2D>("Images/PointerButtonHover"), Vector2.zero, CursorMode.Auto);
|
||||
//SetActive4Button(true);
|
||||
SetColor(true);
|
||||
#endif
|
||||
}
|
||||
void SetActive4Button(bool b)
|
||||
{
|
||||
@@ -160,18 +178,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
transform.Find("BtnInfo").gameObject.SetActive(b);
|
||||
transform.Find("BtnRide").gameObject.SetActive(b);
|
||||
}
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (localY != null)
|
||||
{
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
}
|
||||
transform.Find("CollectImg").gameObject.SetActive(false);
|
||||
transform.Find("Shadow").gameObject.SetActive(false);
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
//SetActive4Button(false);
|
||||
SetColor(false);
|
||||
}
|
||||
|
||||
private void SetColor(bool isFav)
|
||||
{
|
||||
PropNames.icons.ForEach((v) =>
|
||||
|
||||
Reference in new issue
Block a user