2021-04-15 10:13:01 +08:00
|
|
|
|
using Assets.Scenes.Ride.Scripts.Model;
|
|
|
|
|
|
using Assets.Scripts;
|
|
|
|
|
|
using Assets.Scripts.Apis;
|
|
|
|
|
|
using Assets.Scripts.Apis.Models;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
using UnityEngine.EventSystems;
|
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Assets.Scenes.Ride.Scripts
|
|
|
|
|
|
{
|
|
|
|
|
|
public class SelectPlayerFactory : MonoBehaviour
|
|
|
|
|
|
{
|
|
|
|
|
|
GameObject prefab;
|
|
|
|
|
|
GameObject scroll;
|
2021-04-21 14:08:45 +08:00
|
|
|
|
GameObject selectPanel;
|
|
|
|
|
|
GameObject nearPanel;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
Transform content;
|
|
|
|
|
|
Button rideButton;
|
|
|
|
|
|
Button cancelButton;
|
|
|
|
|
|
Button closeButton;
|
|
|
|
|
|
Button searchButton;
|
2021-04-23 19:28:35 +08:00
|
|
|
|
Button sortButton;
|
|
|
|
|
|
Image sortImage;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
GameObject reviewPanel;
|
2021-04-23 19:28:35 +08:00
|
|
|
|
GameObject noRecord;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
InputField inputField;
|
2021-04-23 19:28:35 +08:00
|
|
|
|
InputField startValue;
|
|
|
|
|
|
InputField endValue;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
private int pageIndex = 0;
|
2021-05-11 18:21:32 +08:00
|
|
|
|
private int pageSize = 8;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
private int totalPages = 0;
|
|
|
|
|
|
private string seachName = string.Empty;
|
2021-04-23 19:28:35 +08:00
|
|
|
|
|
|
|
|
|
|
private double _startValue;
|
|
|
|
|
|
private double _endValue;
|
|
|
|
|
|
|
2021-04-15 10:13:01 +08:00
|
|
|
|
CyclingController cyclingController;
|
|
|
|
|
|
public List<GameObject> gameObjects = new List<GameObject>();
|
|
|
|
|
|
List<SelectPlayerItemScript> selectPlayerItemScripts = new List<SelectPlayerItemScript>();
|
|
|
|
|
|
MapApi mapApi;
|
2021-04-23 19:28:35 +08:00
|
|
|
|
Sprite down;
|
|
|
|
|
|
Sprite up;
|
2021-05-26 18:04:58 +08:00
|
|
|
|
Transform parent;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
private void Awake()
|
|
|
|
|
|
{
|
|
|
|
|
|
mapApi = new MapApi();
|
|
|
|
|
|
cyclingController = FindObjectOfType<CyclingController>();
|
|
|
|
|
|
//分页查询当前路数排行榜选手成绩列表
|
2021-05-26 18:04:58 +08:00
|
|
|
|
parent = transform.Find("Panel/PlayerList/Scroll View/Viewport/Content");
|
2021-04-15 10:13:01 +08:00
|
|
|
|
prefab = Resources.Load<GameObject>("UI/Prefab/Ride/SelectPlayerItem");
|
2021-04-23 19:28:35 +08:00
|
|
|
|
down = Resources.Load<Sprite>("Images/DOWN");
|
|
|
|
|
|
up = Resources.Load<Sprite>("Images/UP");
|
2021-04-15 10:13:01 +08:00
|
|
|
|
scroll = transform.Find("Panel/PlayerList/Scroll View").gameObject;
|
|
|
|
|
|
content = transform.Find("Panel/PlayerList/Scroll View/Viewport/Content");
|
|
|
|
|
|
rideButton = transform.Find("Panel/RideButton").GetComponent<Button>();
|
|
|
|
|
|
cancelButton = transform.Find("Panel/CancelButton").GetComponent<Button>();
|
|
|
|
|
|
closeButton = transform.Find("Panel/Close").GetComponent<Button>();
|
|
|
|
|
|
searchButton = transform.Find("Panel/SearchButton").GetComponent<Button>();
|
|
|
|
|
|
inputField = transform.Find("Panel/InputField").GetComponent<InputField>();
|
2021-04-23 19:28:35 +08:00
|
|
|
|
startValue = transform.Find("Panel/StartValue").GetComponent<InputField>();
|
|
|
|
|
|
endValue = transform.Find("Panel/EndValue").GetComponent<InputField>();
|
2021-04-15 10:13:01 +08:00
|
|
|
|
reviewPanel = transform.parent.Find("ReviewPanel").gameObject;
|
2021-04-21 14:08:45 +08:00
|
|
|
|
selectPanel = transform.parent.Find("SelectPanel").gameObject;
|
|
|
|
|
|
nearPanel = transform.parent.Find("NearPanel").gameObject;
|
2021-04-23 19:28:35 +08:00
|
|
|
|
noRecord = transform.Find("Panel/PlayerList/Scroll View/Viewport/NoRecord").gameObject;
|
|
|
|
|
|
sortButton = transform.Find("Panel/SortButton").GetComponent<Button>();
|
|
|
|
|
|
sortImage = transform.Find("Panel/SortButton/Image").GetComponent<Image>();
|
2021-04-15 10:13:01 +08:00
|
|
|
|
|
|
|
|
|
|
inputField.onValueChanged.AddListener(InputTextChanged);
|
2021-04-23 19:28:35 +08:00
|
|
|
|
startValue.onValueChanged.AddListener(StartvalueChanged);
|
2021-04-27 15:15:51 +08:00
|
|
|
|
endValue.onValueChanged.AddListener(EndvalueChanged);
|
2021-04-21 14:08:45 +08:00
|
|
|
|
|
|
|
|
|
|
UIManager.AddEvent(rideButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, PreStart);
|
|
|
|
|
|
UIManager.AddEvent(cancelButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, Cancel);
|
|
|
|
|
|
UIManager.AddEvent(closeButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, Cancel);
|
|
|
|
|
|
UIManager.AddEvent(searchButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, Search);
|
2021-04-23 19:28:35 +08:00
|
|
|
|
UIManager.AddEvent(sortButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, SortWKG);
|
2021-04-15 10:13:01 +08:00
|
|
|
|
UIManager.AddEvent(scroll, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag);
|
|
|
|
|
|
|
|
|
|
|
|
gameObjects.Add(transform.Find("Panel/Player1").gameObject);
|
|
|
|
|
|
gameObjects.Add(transform.Find("Panel/Player2").gameObject);
|
|
|
|
|
|
gameObjects.Add(transform.Find("Panel/Player3").gameObject);
|
|
|
|
|
|
gameObjects.Add(transform.Find("Panel/Player4").gameObject);
|
|
|
|
|
|
gameObjects.Add(transform.Find("Panel/Player5").gameObject);
|
2021-04-29 18:07:30 +08:00
|
|
|
|
//功体比默认条件
|
2021-04-30 23:45:50 +08:00
|
|
|
|
//var currentUserWkg = Math.Round((App.CurrentUser.FTP / App.CurrentUser.Weight),2);
|
|
|
|
|
|
//_startValue = currentUserWkg - 0.5<0?0 : currentUserWkg - 0.5;
|
|
|
|
|
|
//_endValue = currentUserWkg + 0.5;
|
|
|
|
|
|
//startValue.text = _startValue.ToString();
|
|
|
|
|
|
//endValue.text = _endValue.ToString();
|
2021-04-15 10:13:01 +08:00
|
|
|
|
}
|
2021-05-11 18:21:32 +08:00
|
|
|
|
bool startMouse = false;
|
|
|
|
|
|
private void Update()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Input.GetAxis("Mouse ScrollWheel") != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (scroll.GetComponent<ScrollRect>().verticalNormalizedPosition <= 0 ||
|
|
|
|
|
|
scroll.GetComponent<ScrollRect>().verticalNormalizedPosition >= (pageIndex == 0 ? 1.2 : 1))
|
|
|
|
|
|
{
|
|
|
|
|
|
startMouse = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (startMouse)
|
|
|
|
|
|
{
|
|
|
|
|
|
startMouse = false;
|
|
|
|
|
|
OnEndDrag(null);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-05-26 18:04:58 +08:00
|
|
|
|
if (Input.GetKeyDown(KeyCode.Return))
|
|
|
|
|
|
{
|
|
|
|
|
|
Search(null);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-25 18:13:59 +08:00
|
|
|
|
bool enabled = gameObjects.Where(c => c.GetComponent<SeletedPlayerScript>().isUsed).Count() > 0;
|
|
|
|
|
|
rideButton.enabled = enabled;
|
|
|
|
|
|
rideButton.interactable = enabled;
|
2021-05-11 18:21:32 +08:00
|
|
|
|
}
|
2021-04-23 19:28:35 +08:00
|
|
|
|
private void StartvalueChanged(string input)
|
|
|
|
|
|
{
|
2021-04-29 18:07:30 +08:00
|
|
|
|
if (!string.IsNullOrWhiteSpace(input))
|
|
|
|
|
|
{
|
|
|
|
|
|
_startValue = Convert.ToDouble(input);
|
|
|
|
|
|
}
|
2021-04-23 19:28:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
private void EndvalueChanged(string input)
|
|
|
|
|
|
{
|
2021-04-29 18:07:30 +08:00
|
|
|
|
if (!string.IsNullOrWhiteSpace(input))
|
|
|
|
|
|
{
|
|
|
|
|
|
_endValue = Convert.ToDouble(input);
|
|
|
|
|
|
}
|
2021-04-23 19:28:35 +08:00
|
|
|
|
}
|
2021-04-15 10:13:01 +08:00
|
|
|
|
private void InputTextChanged(string input)
|
|
|
|
|
|
{
|
|
|
|
|
|
seachName = input;
|
|
|
|
|
|
}
|
2021-04-23 19:28:35 +08:00
|
|
|
|
private int sort = 0;//0:正序 1:降序
|
|
|
|
|
|
private void SortWKG(BaseEventData baseEventData)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (sort == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
sortImage.sprite = up;
|
|
|
|
|
|
sort = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
sort = 0;
|
|
|
|
|
|
sortImage.sprite = down;
|
|
|
|
|
|
}
|
|
|
|
|
|
Utils.DestroyChildren(content);
|
|
|
|
|
|
Refresh();
|
|
|
|
|
|
}
|
2021-04-21 14:08:45 +08:00
|
|
|
|
private void Search(BaseEventData baseEventData)
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
|
|
|
|
|
Utils.DestroyChildren(content);
|
|
|
|
|
|
Refresh();
|
|
|
|
|
|
}
|
|
|
|
|
|
//开始伴侣骑行的面板
|
2021-04-21 14:08:45 +08:00
|
|
|
|
private void PreStart(BaseEventData baseEventData)
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
|
|
|
|
|
transform.gameObject.SetActive(false);
|
|
|
|
|
|
foreach (var item in gameObjects)
|
|
|
|
|
|
{
|
|
|
|
|
|
var seletedPlayerScript = item.GetComponent<SeletedPlayerScript>();
|
|
|
|
|
|
if (seletedPlayerScript.isUsed)
|
|
|
|
|
|
{
|
|
|
|
|
|
cyclingController.selectParamModel.RankingsId.Add(seletedPlayerScript.GetRankingId());
|
2021-05-12 18:51:03 +08:00
|
|
|
|
cyclingController.selectPlayerDic.Add(seletedPlayerScript.UserId, seletedPlayerScript);
|
2021-04-15 10:13:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-05-08 14:27:56 +08:00
|
|
|
|
//查询选中人员的骑行记录
|
|
|
|
|
|
var rankingList = mapApi.GetRecordFileFromServer(cyclingController.selectParamModel.RankingsId);
|
|
|
|
|
|
|
2021-04-28 15:37:18 +08:00
|
|
|
|
cyclingController.SetCyclingModel(CyclingModel.Review);
|
2021-04-15 10:13:01 +08:00
|
|
|
|
if (!reviewPanel.activeSelf)
|
|
|
|
|
|
{
|
|
|
|
|
|
reviewPanel.SetActive(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2021-05-08 14:27:56 +08:00
|
|
|
|
var reviewFactory = reviewPanel.GetComponent<ReviewFactory>();
|
|
|
|
|
|
reviewFactory.Refresh();
|
|
|
|
|
|
reviewFactory.SetReview(rankingList);
|
2021-04-15 10:13:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
reviewPanel.transform.Find("ReviewArea").gameObject.SetActive(true);
|
|
|
|
|
|
reviewPanel.transform.Find("SingleArea").gameObject.SetActive(false);
|
2021-04-21 14:08:45 +08:00
|
|
|
|
nearPanel.SetActive(true);
|
2021-04-15 10:13:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
//取消和关闭都进入单人骑行界面
|
2021-04-21 14:08:45 +08:00
|
|
|
|
private void Cancel(BaseEventData baseEventData)
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
2021-04-21 14:08:45 +08:00
|
|
|
|
//cyclingController.cyclingModel = CyclingModel.Single;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
transform.gameObject.SetActive(false);
|
2021-04-21 14:08:45 +08:00
|
|
|
|
reviewPanel.SetActive(false);
|
|
|
|
|
|
selectPanel.SetActive(true);
|
|
|
|
|
|
nearPanel.SetActive(false);
|
2021-05-26 18:04:58 +08:00
|
|
|
|
Reset();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void Reset()
|
|
|
|
|
|
{
|
|
|
|
|
|
inputField.text = string.Empty;
|
|
|
|
|
|
startValue.text = string.Empty;
|
|
|
|
|
|
endValue.text = string.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
pageIndex = 0;
|
|
|
|
|
|
pageSize = 8;
|
|
|
|
|
|
totalPages = 0;
|
|
|
|
|
|
seachName = string.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
_startValue = 0;
|
|
|
|
|
|
_endValue = 0;
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in gameObjects)
|
|
|
|
|
|
{
|
|
|
|
|
|
item.GetComponent<SeletedPlayerScript>().Reset();
|
|
|
|
|
|
}
|
|
|
|
|
|
parent.DestroyChildren();
|
|
|
|
|
|
sort = 0;
|
|
|
|
|
|
sortImage.sprite = down;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
private void Start()
|
|
|
|
|
|
{
|
2021-04-29 18:07:30 +08:00
|
|
|
|
//CreateGameObject(cyclingController.mapRouteRankingList);
|
2021-05-26 18:04:58 +08:00
|
|
|
|
//Refresh();
|
2021-04-15 10:13:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-26 18:04:58 +08:00
|
|
|
|
public void Refresh()
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
2021-05-11 18:21:32 +08:00
|
|
|
|
var list = mapApi.GetShadowList(App.RouteIdParam, seachName, pageIndex, pageSize);
|
2021-04-15 10:13:01 +08:00
|
|
|
|
totalPages = list.data.TotalPages;
|
2021-04-25 13:33:43 +08:00
|
|
|
|
var data = list.data.list;//.Where(c => c.WeightKg >= _startValue && c.WeightKg <= _endValue).ToList();
|
|
|
|
|
|
if (_startValue > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
data = data.Where(c => c.WeightKg >= _startValue).ToList();
|
|
|
|
|
|
}
|
|
|
|
|
|
if (_endValue > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
data = data.Where(c => c.WeightKg <= _endValue).ToList();
|
|
|
|
|
|
}
|
2021-04-23 19:28:35 +08:00
|
|
|
|
if (sort == 0)
|
|
|
|
|
|
{
|
2021-04-25 13:33:43 +08:00
|
|
|
|
data = data.OrderByDescending(c => c.WeightKg).ToList();
|
2021-04-23 19:28:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2021-04-25 13:33:43 +08:00
|
|
|
|
data = data.OrderBy(c => c.WeightKg).ToList();
|
2021-04-23 19:28:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
CreateGameObject(data);
|
2021-04-22 19:29:59 +08:00
|
|
|
|
}
|
|
|
|
|
|
private void CreateGameObject(List<MapRouteRanking> list)
|
|
|
|
|
|
{
|
2021-05-26 18:04:58 +08:00
|
|
|
|
|
2021-05-08 14:27:56 +08:00
|
|
|
|
int index = 0;
|
2021-04-22 19:29:59 +08:00
|
|
|
|
foreach (var item in list)
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
2021-05-08 14:27:56 +08:00
|
|
|
|
index++;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
GameObject newObj = (GameObject)Instantiate(prefab, parent);
|
|
|
|
|
|
var selectPlayerItemScript = newObj.GetComponent<SelectPlayerItemScript>();
|
|
|
|
|
|
selectPlayerItemScript.SetRankingId(item.Id.ToString());
|
|
|
|
|
|
selectPlayerItemScript.SetName(item.NickName);
|
|
|
|
|
|
selectPlayerItemScript.SetTimer(item.TotalTime);
|
2021-04-25 13:33:43 +08:00
|
|
|
|
selectPlayerItemScript.SetWeightKg(item.WeightKg.ToString());
|
2021-04-15 10:13:01 +08:00
|
|
|
|
selectPlayerItemScript.SetHeadImage(item.WxHeadImg);
|
2021-05-12 18:51:03 +08:00
|
|
|
|
selectPlayerItemScript.Weight = item.Weight;
|
|
|
|
|
|
selectPlayerItemScript.BikeWeight = item.BicycleWeight;
|
|
|
|
|
|
selectPlayerItemScript.UserId = item.UserId;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
selectPlayerItemScripts.Add(selectPlayerItemScript);
|
2021-05-08 14:27:56 +08:00
|
|
|
|
//UIManager.AddEventWithoutCursor(selectPlayerItemScript.GetButton().gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, OnSelectClick);
|
|
|
|
|
|
selectPlayerItemScript.GetButton().onClick.AddListener(delegate () { this.OnSelectClick(selectPlayerItemScript); });
|
2021-04-15 10:13:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-05-08 14:27:56 +08:00
|
|
|
|
private void OnSelectClick(SelectPlayerItemScript selectPlayerItemScript)
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
2021-05-08 14:27:56 +08:00
|
|
|
|
var seletedScriptList = FindObjectsOfType<SeletedPlayerScript>();
|
|
|
|
|
|
var exisitList = seletedScriptList.Where(c => c.GetRankingId().Equals(selectPlayerItemScript.GetRankingId()));
|
|
|
|
|
|
if(exisitList.Count() == 0)
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
2021-05-08 14:27:56 +08:00
|
|
|
|
var seletedPlayerScript = seletedScriptList.Where(c=>!c.isUsed).OrderBy(c=>c.transform.GetSiblingIndex()).FirstOrDefault();
|
|
|
|
|
|
if (seletedPlayerScript != null)
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
|
|
|
|
|
seletedPlayerScript.SetHead(selectPlayerItemScript.GetImageTexture(), true);
|
|
|
|
|
|
seletedPlayerScript.SetName(selectPlayerItemScript.GetName());
|
|
|
|
|
|
seletedPlayerScript.SetRankingId(selectPlayerItemScript.GetRankingId());
|
2021-05-12 18:51:03 +08:00
|
|
|
|
seletedPlayerScript.UserId = selectPlayerItemScript.UserId;
|
|
|
|
|
|
seletedPlayerScript.Weight = selectPlayerItemScript.Weight;
|
|
|
|
|
|
seletedPlayerScript.BikeWeight = selectPlayerItemScript.BikeWeight;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
UIManager.AddEvent(seletedPlayerScript.GetButton().gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, OnCloseClick);
|
|
|
|
|
|
selectPlayerItemScript.isSelected = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
private void OnCloseClick(BaseEventData baseEventData)
|
|
|
|
|
|
{
|
|
|
|
|
|
var seletedPlayerScript = baseEventData.selectedObject.transform.parent.GetComponent<SeletedPlayerScript>();
|
|
|
|
|
|
var seletPlayerItemScript = selectPlayerItemScripts.Where(c => c.GetRankingId() == seletedPlayerScript.GetRankingId()).FirstOrDefault();
|
|
|
|
|
|
if (seletPlayerItemScript != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
seletPlayerItemScript.isSelected = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
seletedPlayerScript.Reset();
|
|
|
|
|
|
}
|
2021-05-12 18:51:03 +08:00
|
|
|
|
|
2021-04-15 10:13:01 +08:00
|
|
|
|
private void OnEndDrag(BaseEventData arg0)
|
|
|
|
|
|
{
|
|
|
|
|
|
var scrollrect = scroll.GetComponent<ScrollRect>();
|
|
|
|
|
|
if (scrollrect.verticalNormalizedPosition <= 0)
|
|
|
|
|
|
{
|
2021-05-11 18:21:32 +08:00
|
|
|
|
if (pageIndex < totalPages-1 )
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
|
|
|
|
|
pageIndex++;
|
|
|
|
|
|
Refresh();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-05-08 14:27:56 +08:00
|
|
|
|
|
|
|
|
|
|
if (scrollrect.verticalNormalizedPosition >= (pageIndex == 0 ? 1.2 : 1))
|
2021-04-15 10:13:01 +08:00
|
|
|
|
{
|
|
|
|
|
|
if (pageIndex >0)
|
|
|
|
|
|
{
|
|
|
|
|
|
pageIndex--;
|
|
|
|
|
|
Refresh();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|