Merge remote-tracking branch 'origin/dev_mobile' into dev_mobile_ble
# Conflicts: # Assets/Scenes/Login-Mobile.unity
This commit is contained in:
commit
939d6f1d0c
20 files changed
+1636
-1518
No files matched your search
@@ -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