微信登录接入;卡片点击效果
This commit is contained in:
1 parent
51cea743be
commit
969835e4d7
20 files changed
+1558
-1352
No files matched your search
@@ -155,6 +155,8 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
//SetActive4Button(false);
|
||||
SetColor(false);
|
||||
#else
|
||||
transform.Find("Shadow").GetComponent<Image>().DOFade(0, 0.3f);
|
||||
#endif
|
||||
}
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
@@ -170,6 +172,8 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
Cursor.SetCursor(Resources.Load<Texture2D>("Images/PointerButtonHover"), Vector2.zero, CursorMode.Auto);
|
||||
//SetActive4Button(true);
|
||||
SetColor(true);
|
||||
#else
|
||||
transform.Find("Shadow").GetComponent<Image>().DOFade(1, 0.3f);
|
||||
#endif
|
||||
}
|
||||
void SetActive4Button(bool b)
|
||||
|
||||
@@ -433,6 +433,7 @@ public class EditUserController : PFUIPanel, INativeOnMobileImageSelect
|
||||
|
||||
public void OnMobileImageSelect(string res)
|
||||
{
|
||||
Debug.Log(res);
|
||||
if (res.IndexOf("true,") == 0)
|
||||
{
|
||||
var path = res.Replace("true,", "");
|
||||
|
||||
@@ -9,10 +9,7 @@ using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RaceItemScript : MonoBehaviour
|
||||
#if !(UNITY_ANDROID||UNITY_IOS)
|
||||
, IPointerExitHandler, IPointerEnterHandler, IPointerUpHandler
|
||||
#endif
|
||||
public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler, IPointerUpHandler
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
public enum ItemType { big, small }
|
||||
@@ -215,6 +212,7 @@ public class RaceItemScript : MonoBehaviour
|
||||
status.GetComponent<ContentFitterController>().Refresh();
|
||||
}
|
||||
}
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
float? localY = null;
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
@@ -281,6 +279,28 @@ public class RaceItemScript : MonoBehaviour
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
|
||||
}
|
||||
#else
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (_from == "list")
|
||||
{
|
||||
transform.Find("Masking").GetComponent<CanvasGroup>().DOFade(0, 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (_from == "list")
|
||||
{
|
||||
transform.Find("Masking").GetComponent<CanvasGroup>().DOFade(1, 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPointerUp(PointerEventData eventData)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
public void Join()
|
||||
{
|
||||
var res = ConfigHelper.mapCompetitionApi.ApplyMapCompetition(mapCompetition.Id);
|
||||
@@ -321,4 +341,6 @@ public class RaceItemScript : MonoBehaviour
|
||||
Utils.showToast(null, res.errMsg, type: 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -26,6 +26,8 @@ public class ResultListController : PFUIPanel
|
||||
{
|
||||
{0,"routes" },{1,"competition" }
|
||||
};
|
||||
//交互用
|
||||
public Transform currentItem { get; set; }
|
||||
void Awake()
|
||||
{
|
||||
//ApiBase.SetCookie("73385F5F719B610D132C1ECF3E9143272BF15214D57ED91CD7A9DFD832407471535112AAEB8E9271F75D54FBBF2D99F18FA313C1EEA5676F5D722D7FBB07C926BEC5905591BF9AFDDC6336552DF273112C2DA1794E6FA2F465B11FECD2E82E52");
|
||||
@@ -201,7 +203,7 @@ public class ResultListController : PFUIPanel
|
||||
foreach (var item in list)
|
||||
{
|
||||
var obj = Instantiate(routeResult);
|
||||
obj.GetComponent<RouteItem>().Initial(item, index);
|
||||
obj.GetComponent<RouteItem>().Initial(item, index, transform);
|
||||
//obj.SendMessage("Initial", );
|
||||
obj.transform.parent = content;
|
||||
obj.transform.localScale = new Vector3(1, 1, 1);
|
||||
|
||||
@@ -31,8 +31,14 @@ public class RouteItem : MonoBehaviour
|
||||
RouteResult data;
|
||||
//滑动索引 0route 1match
|
||||
int index;
|
||||
public void Initial(RouteResult result,int index)
|
||||
//交互用
|
||||
private Transform parent { get; set; }
|
||||
public void Initial(RouteResult result,int index,Transform parent = null)
|
||||
{
|
||||
if (parent)
|
||||
{
|
||||
this.parent = parent;
|
||||
}
|
||||
routeResult = result;
|
||||
this.index = index;
|
||||
left = transform.Find("BigLeft/Left");
|
||||
@@ -295,6 +301,12 @@ public class RouteItem : MonoBehaviour
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
var pController = parent.GetComponent<ResultListController>();
|
||||
if (pController.currentItem)
|
||||
{
|
||||
pController.currentItem.GetComponent<RouteItem>().OnPointerExit(null);
|
||||
}
|
||||
pController.currentItem = transform;
|
||||
transform.GetComponent<Image>().color = Utils.HexToColorHtml("#353543");
|
||||
//if (index == 1)
|
||||
//{
|
||||
|
||||
Reference in new issue
Block a user