登录页一些效果,接路线列表页
This commit is contained in:
1 parent
d1d9c92f1c
commit
f45711f39f
78 files changed
+9990
-5830
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class MapListScript : MonoBehaviour, IEndDragHandler
|
||||
{
|
||||
public void OnEndDrag(PointerEventData eventData)
|
||||
{
|
||||
var sc = gameObject.transform.parent.GetComponent<MapListController>();
|
||||
if (eventData.position.y < 0)
|
||||
{
|
||||
sc.Refresh();
|
||||
}
|
||||
if (eventData.position.y + Screen.height > sc.Content.GetComponent<RectTransform>().rect.height)
|
||||
{
|
||||
sc.pageIndex++;
|
||||
sc.GetList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b590b8b6670b334ea1953fea1deba17
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,49 @@
|
||||
using Assets.Cyp.Common;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class MyMap
|
||||
{
|
||||
public string name { get; set; }
|
||||
public int rank { get; set; }
|
||||
public string image { get; set; }
|
||||
}
|
||||
public class MapScript : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
[SerializeField] Text text;
|
||||
[SerializeField] GameObject panel;
|
||||
[SerializeField] RawImage rawImage;
|
||||
void Start()
|
||||
{
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
public void Initial(MapRoute myMap)
|
||||
{
|
||||
gameObject.GetComponent<Button>().onClick.AddListener(()=>
|
||||
{
|
||||
//SceneManager.LoadScene("4-Demo", LoadSceneMode.Additive);
|
||||
});
|
||||
text.text = myMap.Name;
|
||||
Utils.DisplayImage(StartCoroutine, rawImage, myMap.CoverImage);
|
||||
int i = 0;
|
||||
foreach (RectTransform transform in panel.transform)
|
||||
{
|
||||
//if (i < myMap.rank && i < 5)
|
||||
if (i < 3 && i<5)
|
||||
{
|
||||
transform.GetComponent<Image>().color = new Color(255, 255, 0);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2521131d8a9d2564390f6228711f4522
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user