This commit is contained in:
Caiyanpeng committed 2021-08-26 15:49:06 +08:00
1 parent 723c881790
commit f21b83697b
18 files changed
+1912 -1386

No files matched your search

@@ -129,7 +129,14 @@ public class HomeController : PFUIPanel
Application.Quit();
});
#else
Application.OpenURL("powerfun://app");
if (App.weChatController.isApplicationAvilible("com.zhixingpai.powerfun", "powerfun"))
{
Application.OpenURL("powerfun://app");
}
else
{
Application.OpenURL("http://www.powerfun.com/Download");
}
#endif
}
//进入比赛
@@ -29,6 +29,9 @@ public class ResultListController : PFUIPanel
void Awake()
{
//ApiBase.SetCookie("73385F5F719B610D132C1ECF3E9143272BF15214D57ED91CD7A9DFD832407471535112AAEB8E9271F75D54FBBF2D99F18FA313C1EEA5676F5D722D7FBB07C926BEC5905591BF9AFDDC6336552DF273112C2DA1794E6FA2F465B11FECD2E82E52");
#if UNITY_ANDROID || UNITY_IOS
routeResult = Resources.Load<Transform>("UI/Prefab/ResultList/RouteItem-Mobile");
#endif
InitialColor();
scroll = transform.Find("ListPanel").Find("Scroll").GetComponent<ScrollRect>();
btnMatch = transform.Find("ListPanel").Find("BtnMatch");
@@ -283,7 +286,7 @@ public class ResultListController : PFUIPanel
}
scroll.transform.Find("Error").gameObject.SetActive(contents[scrollIndex].childCount == 0);
}
#region 主页面滑动逻辑
#region 主页面滑动逻辑
int scrollIndex = 0;
bool startScroll = false;
ScrollRect scroll;
@@ -296,7 +299,6 @@ public class ResultListController : PFUIPanel
var value = index * scrollValue;
if (scroll != null && startScroll)
{
#if (UNITY_ANDROID || UNITY_IOS)
if (scroll.horizontalNormalizedPosition >= value)
{
scroll.horizontalNormalizedPosition -= (scrollValue / 20);
@@ -317,30 +319,6 @@ public class ResultListController : PFUIPanel
startScroll = false;
}
}
#else
//if (scroll.verticalNormalizedPosition <= 1)
//{
// scroll.verticalNormalizedPosition =0;
// Debug.Log($"{scroll.verticalNormalizedPosition},{scrollValue/20}");
// if (scroll.verticalNormalizedPosition <= 0)
// {
// Debug.Log(index);
// scroll.verticalNormalizedPosition = 0;
// startScroll = false;
// }
//}
//else
//{
// scroll.verticalNormalizedPosition += (scrollValue / 20);
// Debug.Log($"反向:{scroll.verticalNormalizedPosition},{scrollValue / 20}");
// if (scroll.verticalNormalizedPosition >= 1)
// {
// Debug.Log(index);
// scroll.verticalNormalizedPosition = 1;
// startScroll = false;
// }
//}
#endif
}
}
#endregion
@@ -100,12 +100,12 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
transform.Find("Right").gameObject.SetActive(false);
}
//right.gameObject.SetActive(true);
#if !(UNITY_ANDROID || UNITY_IOS)
gameObject.GetComponent<Button>().onClick.AddListener(() =>
{
Detail();
});
});
#endif
}
void Detail()
{