单人骑行界面
This commit is contained in:
1 parent
cdccd78602
commit
c5586b3eb1
41 files changed
+69375
-2628
No files matched your search
@@ -227,7 +227,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//游戏开始开关
|
||||
public virtual bool GetStart()
|
||||
{
|
||||
return mainController.isStart;
|
||||
if (mainController != null)
|
||||
{
|
||||
return mainController.isStart;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
protected virtual void BeforeRun()
|
||||
{
|
||||
|
||||
@@ -175,9 +175,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
protected virtual void StartRide(BaseEventData baseEvent)
|
||||
{
|
||||
var checkAnt = cyclingController.CheckAnt();
|
||||
//#if UNITY_EDITOR
|
||||
#if UNITY_EDITOR
|
||||
checkAnt = true;
|
||||
//#endif
|
||||
#endif
|
||||
if (!checkAnt && !cyclingController.isWatch)
|
||||
{
|
||||
var alert = (GameObject)Instantiate(Resources.Load("UI/Prefab/Ride/Alert"), panel.transform);
|
||||
|
||||
@@ -62,6 +62,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
protected RawImage head;//海拔图头像
|
||||
protected GameObject miniMap;//小地图
|
||||
protected GameObject toolbar;//toolbar
|
||||
protected RawImage altitudeGraph;//海拔图
|
||||
protected Image leftImage;
|
||||
protected Image rightImage;
|
||||
@@ -106,76 +107,90 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
protected Slider cameraSlider;
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
protected virtual void Start()
|
||||
{
|
||||
InitData();//初始
|
||||
RenderChart();//渲染海拔图
|
||||
}
|
||||
|
||||
private void InitGameObject()
|
||||
{
|
||||
#region 控件获取与事件绑定
|
||||
fps = transform.Find("Panel/FPS").GetComponent<Text>();
|
||||
arrow = transform.Find("Panel/Arrow").GetComponent<Image>();
|
||||
fps = uipanel.transform.Find("FPS").GetComponent<Text>();
|
||||
arrow = uipanel.transform.Find("Arrow").GetComponent<Image>();
|
||||
map = transform.parent.Find("Map").GetComponent<AbstractMap>();
|
||||
leftPanel = transform.Find("Panel/ReviewPanel").gameObject;
|
||||
nearByPanel = transform.Find("Panel/NearPanel").gameObject;
|
||||
startPanel = transform.Find("Panel/StartPanel").gameObject;
|
||||
startBtn = transform.Find("Panel/StartPanel/StartButton").GetComponent<Button>();
|
||||
simpleBtn = transform.Find("Panel/SimpleButton").GetComponent<Button>();
|
||||
ditance = transform.Find("Panel/ComputerPanel/Distance").GetComponent<Text>();
|
||||
titlePanel = transform.Find("Panel/TitlePanel").gameObject;
|
||||
totalDistance = transform.Find("Panel/TitlePanel/TotalDistance").GetComponent<Text>();
|
||||
candance = transform.Find("Panel/PowerPanel/Cadance").GetComponent<Text>();
|
||||
heartRate = transform.Find("Panel/PowerPanel/Hrv").GetComponent<Text>();
|
||||
nextSlopePanel = transform.Find("Panel/NextSlopePanel").gameObject;
|
||||
currentSlopePanel = transform.Find("Panel/CurrentSlopePanel").gameObject;
|
||||
nextSlopeText = transform.Find("Panel/NextSlopePanel/NextSlopeText").GetComponent<Text>();
|
||||
nextSlopeDistanceText = transform.Find("Panel/NextSlopePanel/NextSlopeDistance").GetComponent<Text>();
|
||||
currentSlopeText = transform.Find("Panel/CurrentSlopePanel/CurrentSlopeText").GetComponent<Text>();
|
||||
currentSlopeDistanceText = transform.Find("Panel/CurrentSlopePanel/CurrentSlopeDistance").GetComponent<Text>();
|
||||
currentSlopeToatalDistanceText = transform.Find("Panel/CurrentSlopePanel/TotalSlopeDistance").GetComponent<Text>();
|
||||
currentSlopeProcess = transform.Find("Panel/CurrentSlopePanel/Process").GetComponent<Image>();
|
||||
|
||||
speedTxt = transform.Find("Panel/ComputerPanel/Speed").GetComponent<Text>();
|
||||
powerTxt = transform.Find("Panel/PowerPanel/Power").GetComponent<Text>();
|
||||
timerTxt = transform.Find("Panel/ComputerPanel/Timer").GetComponent<Text>();
|
||||
timerTxtTitle = transform.Find("Panel/ComputerPanel/TimerTitle").GetComponent<Text>();
|
||||
countDownTxt = transform.Find("Panel/CountDown").GetComponent<Text>();
|
||||
mapName = transform.Find("Panel/TitlePanel/MapName").GetComponent<Text>();
|
||||
totalClimb = transform.Find("Panel/ComputerPanel/TotalClimb").GetComponent<Text>();
|
||||
//img = transform.Find("Panel/ElevationChart/HeadImage").GetComponent<RawImage>();
|
||||
head = transform.Find("Panel/GraphChart/HeadPanel/Head").GetComponent<RawImage>();
|
||||
headPanel = transform.Find("Panel/GraphChart/HeadPanel").gameObject;
|
||||
t = transform.Find("Panel/GraphChart/Button");
|
||||
miniMap = transform.Find("Panel/MiniMap").gameObject;
|
||||
leftPanel = uipanel.transform.Find("ReviewPanel").gameObject;
|
||||
nearByPanel = uipanel.transform.Find("NearPanel").gameObject;
|
||||
startPanel = uipanel.transform.Find("StartPanel").gameObject;
|
||||
startBtn = uipanel.transform.Find("StartPanel/StartButton").GetComponent<Button>();
|
||||
simpleBtn = uipanel.transform.Find("SimpleButton").GetComponent<Button>();
|
||||
ditance = uipanel.transform.Find("ComputerPanel/Distance").GetComponent<Text>();
|
||||
titlePanel = uipanel.transform.Find("TitlePanel").gameObject;
|
||||
totalDistance = uipanel.transform.Find("TitlePanel/TotalDistance").GetComponent<Text>();
|
||||
candance = uipanel.transform.Find("PowerPanel/Cadance").GetComponent<Text>();
|
||||
heartRate = uipanel.transform.Find("PowerPanel/Hrv").GetComponent<Text>();
|
||||
nextSlopePanel = uipanel.transform.Find("NextSlopePanel").gameObject;
|
||||
currentSlopePanel = uipanel.transform.Find("CurrentSlopePanel").gameObject;
|
||||
nextSlopeText = uipanel.transform.Find("NextSlopePanel/NextSlopeText").GetComponent<Text>();
|
||||
nextSlopeDistanceText = uipanel.transform.Find("NextSlopePanel/NextSlopeDistance").GetComponent<Text>();
|
||||
currentSlopeText = uipanel.transform.Find("CurrentSlopePanel/CurrentSlopeText").GetComponent<Text>();
|
||||
currentSlopeDistanceText = uipanel.transform.Find("CurrentSlopePanel/CurrentSlopeDistance").GetComponent<Text>();
|
||||
currentSlopeToatalDistanceText = uipanel.transform.Find("CurrentSlopePanel/TotalSlopeDistance").GetComponent<Text>();
|
||||
currentSlopeProcess = uipanel.transform.Find("CurrentSlopePanel/Process").GetComponent<Image>();
|
||||
|
||||
alertPanel = transform.Find("Panel/Alert").gameObject;
|
||||
speedTxt = uipanel.transform.Find("ComputerPanel/Speed").GetComponent<Text>();
|
||||
powerTxt = uipanel.transform.Find("PowerPanel/Power").GetComponent<Text>();
|
||||
timerTxt = uipanel.transform.Find("ComputerPanel/Timer").GetComponent<Text>();
|
||||
timerTxtTitle = uipanel.transform.Find("ComputerPanel/TimerTitle").GetComponent<Text>();
|
||||
countDownTxt = uipanel.transform.Find("CountDown").GetComponent<Text>();
|
||||
mapName = uipanel.transform.Find("TitlePanel/MapName").GetComponent<Text>();
|
||||
totalClimb = uipanel.transform.Find("ComputerPanel/TotalClimb").GetComponent<Text>();
|
||||
//img = uipanel.transform.Find("ElevationChart/HeadImage").GetComponent<RawImage>();
|
||||
head = uipanel.transform.Find("GraphChart/HeadPanel/Head").GetComponent<RawImage>();
|
||||
headPanel = uipanel.transform.Find("GraphChart/HeadPanel").gameObject;
|
||||
t = uipanel.transform.Find("GraphChart/Button");
|
||||
miniMap = uipanel.transform.Find("MiniMap").gameObject;
|
||||
|
||||
selectPanel = transform.Find("Panel/SelectPanel").gameObject;
|
||||
selectPlayer = transform.Find("Panel/SelectPlayer").gameObject;
|
||||
reviewPanel = transform.Find("Panel/ReviewPanel").gameObject;
|
||||
quitPanel = transform.Find("Panel/QuitPanel").gameObject;
|
||||
alertPanel = uipanel.transform.Find("Alert").gameObject;
|
||||
|
||||
pauseButton = transform.Find("Panel/ToolBarPanel/StartOrPauseButton").GetComponent<Button>();
|
||||
settingButton = transform.Find("Panel/ToolBarPanel/SettingButton").GetComponent<Button>();
|
||||
deviceButton = transform.Find("Panel/ToolBarPanel/DeviceButton").GetComponent<Button>();
|
||||
exitButton = transform.Find("Panel/ToolBarPanel/ExitButton").GetComponent<Button>();
|
||||
selectPanel = uipanel.transform.Find("SelectPanel").gameObject;
|
||||
selectPlayer = uipanel.transform.Find("SelectPlayer").gameObject;
|
||||
reviewPanel = uipanel.transform.Find("ReviewPanel").gameObject;
|
||||
quitPanel = uipanel.transform.Find("QuitPanel").gameObject;
|
||||
|
||||
singleButton = transform.Find("Panel/SelectPanel/SingleButton").GetComponent<Button>();
|
||||
shadowButton = transform.Find("Panel/SelectPanel/ShadowButton").GetComponent<Button>();
|
||||
pauseButton = uipanel.transform.Find("ToolBarPanel/StartOrPauseButton").GetComponent<Button>();
|
||||
settingButton = uipanel.transform.Find("ToolBarPanel/SettingButton").GetComponent<Button>();
|
||||
deviceButton = uipanel.transform.Find("ToolBarPanel/DeviceButton").GetComponent<Button>();
|
||||
exitButton = uipanel.transform.Find("ToolBarPanel/ExitButton").GetComponent<Button>();
|
||||
|
||||
singleArea = transform.Find("Panel/ReviewPanel/SingleArea").gameObject;
|
||||
addButton = transform.Find("Panel/ReviewPanel/SingleArea/AddButton").GetComponent<Button>();
|
||||
singleButton = uipanel.transform.Find("SelectPanel/SingleButton").GetComponent<Button>();
|
||||
shadowButton = uipanel.transform.Find("SelectPanel/ShadowButton").GetComponent<Button>();
|
||||
|
||||
saveButton = transform.Find("Panel/QuitPanel/SaveButton").GetComponent<Button>();
|
||||
cancelQuitButton = transform.Find("Panel/QuitPanel/CancelButton").GetComponent<Button>();
|
||||
closeQuitButton = transform.Find("Panel/QuitPanel/CloseButton").GetComponent<Button>();
|
||||
abandonButton = transform.Find("Panel/QuitPanel/AbandonButton").GetComponent<Button>();
|
||||
singleArea = uipanel.transform.Find("ReviewPanel/SingleArea").gameObject;
|
||||
addButton = uipanel.transform.Find("ReviewPanel/SingleArea/AddButton").GetComponent<Button>();
|
||||
|
||||
viewButton = transform.Find("Panel/ViewButton").GetComponent<Button>();
|
||||
altitudeGraph = transform.Find("Panel/TitlePanel/AltitudeGraph").GetComponent<RawImage>();
|
||||
leftImage = transform.Find("Panel/TitlePanel/AltitudeGraph/Left").GetComponent<Image>();
|
||||
rightImage = transform.Find("Panel/TitlePanel/AltitudeGraph/Right").GetComponent<Image>();
|
||||
area = transform.Find("Panel/TitlePanel/AltitudeGraph/Area").GetComponent<Image>();
|
||||
settingPanel = transform.Find("Panel/SettingPanel").gameObject;
|
||||
preSlopeText = transform.Find("Panel/PreSlopePanel/PreSlopeText").GetComponent<Text>();
|
||||
saveButton = uipanel.transform.Find("QuitPanel/SaveButton").GetComponent<Button>();
|
||||
cancelQuitButton = uipanel.transform.Find("QuitPanel/CancelButton").GetComponent<Button>();
|
||||
closeQuitButton = uipanel.transform.Find("QuitPanel/CloseButton").GetComponent<Button>();
|
||||
abandonButton = uipanel.transform.Find("QuitPanel/AbandonButton").GetComponent<Button>();
|
||||
|
||||
nextSlopeImage = transform.Find("Panel/NextSlopePanel/NextSlopeImage").GetComponent<Image>();
|
||||
currentSlopeImage = transform.Find("Panel/CurrentSlopePanel/Image").GetComponent<Image>();
|
||||
viewButton = uipanel.transform.Find("ViewButton").GetComponent<Button>();
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
viewButton = uipanel.transform.Find("ToolBarPanel/ViewButton").GetComponent<Button>();
|
||||
#endif
|
||||
toolbar = uipanel.transform.Find("ToolBarPanel").gameObject;
|
||||
altitudeGraph = uipanel.transform.Find("TitlePanel/AltitudeGraph").GetComponent<RawImage>();
|
||||
leftImage = uipanel.transform.Find("TitlePanel/AltitudeGraph/Left").GetComponent<Image>();
|
||||
rightImage = uipanel.transform.Find("TitlePanel/AltitudeGraph/Right").GetComponent<Image>();
|
||||
area = uipanel.transform.Find("TitlePanel/AltitudeGraph/Area").GetComponent<Image>();
|
||||
settingPanel = uipanel.transform.Find("SettingPanel").gameObject;
|
||||
preSlopeText = uipanel.transform.Find("PreSlopePanel/PreSlopeText").GetComponent<Text>();
|
||||
|
||||
nextSlopeImage = uipanel.transform.Find("NextSlopePanel/NextSlopeImage").GetComponent<Image>();
|
||||
currentSlopeImage = uipanel.transform.Find("CurrentSlopePanel/Image").GetComponent<Image>();
|
||||
|
||||
//加载坡度图片
|
||||
downhill1 = Resources.Load<Sprite>("Images/Ride/downhill 1");
|
||||
@@ -188,14 +203,14 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
target = transform.parent.Find("Target").gameObject;
|
||||
//小地图进度
|
||||
miniMapProcess = transform.Find("Panel/MiniMap/Process").GetComponent<Image>();
|
||||
miniMapProcessText = transform.Find("Panel/MiniMap/Process/Text").GetComponent<Text>();
|
||||
miniMapProcess = uipanel.transform.Find("MiniMap/Process").GetComponent<Image>();
|
||||
miniMapProcessText = uipanel.transform.Find("MiniMap/Process/Text").GetComponent<Text>();
|
||||
|
||||
|
||||
UIManager.AddEvent(pauseButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, PauseRide);
|
||||
UIManager.AddEvent(exitButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, StopRide);
|
||||
UIManager.AddEvent(saveButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, SaveRide);
|
||||
|
||||
|
||||
UIManager.AddEvent(settingButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, ShowSettingPanel);
|
||||
UIManager.AddEvent(deviceButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, ShowDevicePanel);
|
||||
UIManager.AddEvent(simpleBtn.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, ClearPanel);
|
||||
@@ -210,14 +225,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
UIManager.AddEvent(shadowButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerEnter, OnPointEnter);
|
||||
UIManager.AddEvent(singleButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, OnPointExit);
|
||||
UIManager.AddEvent(shadowButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, OnPointExit);
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
protected virtual void Start()
|
||||
{
|
||||
Init();//初始
|
||||
RenderChart();//渲染海拔图
|
||||
}
|
||||
protected virtual void Update()
|
||||
{
|
||||
time -= Time.deltaTime;
|
||||
@@ -241,12 +251,15 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
private Vector3 m = new Vector3(0.1f, 0.1f, 0.1f);
|
||||
private Vector3 CameraVector = Vector3.zero;
|
||||
|
||||
public void Init()
|
||||
GameObject uipanel { get; set; }
|
||||
public void InitData()
|
||||
{
|
||||
playerController = FindObjectOfType<PlayerController>();
|
||||
mainController = FindObjectOfType<CyclingController>();
|
||||
player = transform.parent.Find("Player");
|
||||
var route = mainController.GetRoute();
|
||||
uipanel = mainController.GetUIPanel();
|
||||
InitGameObject();
|
||||
routeInstance = route.RouteInstance;
|
||||
//初始化3d视角
|
||||
var camera = routeInstance.Camera;
|
||||
@@ -258,8 +271,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
cameraZ = float.Parse(cameraArr[2]);
|
||||
}
|
||||
//开发者视角调整
|
||||
cameraSlider = transform.Find("Panel/CameraSlider").GetComponent<Slider>();
|
||||
Text CameraText = transform.Find("Panel/CameraSlider/Text").GetComponent<Text>();
|
||||
cameraSlider = uipanel.transform.Find("CameraSlider").GetComponent<Slider>();
|
||||
Text CameraText = uipanel.transform.Find("CameraSlider/Text").GetComponent<Text>();
|
||||
string[] phoneList = new string[] { "18120141032", "15651831367", "18120141031", "15261826280", "18662240319" };
|
||||
if (phoneList.Contains(App.CurrentUser.Phone))
|
||||
{
|
||||
@@ -467,7 +480,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//显示设备连接
|
||||
public void ShowDevicePanel(BaseEventData baseEventData)
|
||||
{
|
||||
UIManager.Show(UIManager.Instance.DevicePanel, transform.Find("Panel").GetComponent<PFUIPanel>());
|
||||
|
||||
UIManager.Show(UIManager.Instance.DevicePanel, uipanel.GetComponent<PFUIPanel>());
|
||||
}
|
||||
//显示设置
|
||||
public void ShowSettingPanel(BaseEventData baseEventData)
|
||||
@@ -477,7 +491,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//进入简约模式
|
||||
protected int isSimple = 1;
|
||||
protected bool clearLock = true;
|
||||
protected virtual void ClearPanel(BaseEventData baseEventData)
|
||||
public virtual void ClearPanel(BaseEventData baseEventData)
|
||||
{
|
||||
if (clearLock)
|
||||
{
|
||||
@@ -485,12 +499,16 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
leftPanel.transform.DOLocalMove(new Vector3(leftPanel.transform.localPosition.x + isSimple * 430f, leftPanel.transform.localPosition.y, leftPanel.transform.localPosition.z), 1);
|
||||
titlePanel.transform.DOLocalMove(new Vector3(titlePanel.transform.localPosition.x, titlePanel.transform.localPosition.y + isSimple * 200f, titlePanel.transform.localPosition.z), 1);
|
||||
miniMap.transform.DOLocalMove(new Vector3(miniMap.transform.localPosition.x, miniMap.transform.localPosition.y + isSimple * 260f, miniMap.transform.localPosition.z), 1);
|
||||
var Scale = isSimple == 1 ? new Vector3(0.7f, 0.7f, 0.7f) : new Vector3(1f, 1f, 1f);
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
toolbar.transform.DOLocalMove(new Vector3(toolbar.transform.localPosition.x, toolbar.transform.localPosition.y + isSimple * 260f, toolbar.transform.localPosition.z), 1);
|
||||
#else
|
||||
viewButton.transform.DOLocalMove(new Vector3(viewButton.transform.localPosition.x + isSimple * 200f, viewButton.transform.localPosition.y, viewButton.transform.localPosition.z), 1);
|
||||
nextSlopePanel.transform.DOLocalMove(new Vector3(nextSlopePanel.transform.localPosition.x, nextSlopePanel.transform.localPosition.y + isSimple * 260f, nextSlopePanel.transform.localPosition.z), 1);
|
||||
currentSlopePanel.transform.DOLocalMove(new Vector3(currentSlopePanel.transform.localPosition.x, currentSlopePanel.transform.localPosition.y + isSimple * 120f, currentSlopePanel.transform.localPosition.z), 1);
|
||||
var Scale = isSimple == 1 ? new Vector3(0.7f, 0.7f, 0.7f) : new Vector3(1f, 1f, 1f);
|
||||
currentSlopePanel.transform.DOScale(Scale, 1);
|
||||
|
||||
viewButton.transform.DOLocalMove(new Vector3(viewButton.transform.localPosition.x + isSimple * 200f, viewButton.transform.localPosition.y, viewButton.transform.localPosition.z), 1);
|
||||
#endif
|
||||
|
||||
nearByPanel.transform.DOLocalMove(new Vector3(nearByPanel.transform.localPosition.x + isSimple * -330f, nearByPanel.transform.localPosition.y, nearByPanel.transform.localPosition.z), 1).onComplete += () =>
|
||||
{
|
||||
@@ -520,10 +538,15 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
x += item.Distance;
|
||||
dd.Add(item.Elevation);
|
||||
}
|
||||
chartDataSourceScript = transform.Find("Panel/GraphChart").GetComponent<ChartDataSourceScript>();
|
||||
graph = transform.Find("Panel/GraphChart").GetComponent<GraphChartBase>();
|
||||
chartDataSourceScript = uipanel.transform.Find("GraphChart").GetComponent<ChartDataSourceScript>();
|
||||
graph = uipanel.transform.Find("GraphChart").GetComponent<GraphChartBase>();
|
||||
chartDataSourceScript.SetDataSource(dd.ToArray());
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
foreach (var cat in ((IInternalGraphData)graph.DataSource).Categories)
|
||||
{
|
||||
cat.LineThickness = 2f;
|
||||
}
|
||||
#endif
|
||||
if (App.CurrentUser != null)
|
||||
{
|
||||
Utils.DisplayImage(head, App.CurrentUser.WxHeadImg);
|
||||
@@ -536,8 +559,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
leftImage.gameObject.SetActive(false);
|
||||
rightImage.gameObject.SetActive(false);
|
||||
altitudeGraph.gameObject.SetActive(false);
|
||||
area.gameObject.SetActive(false);
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
altitudeGraph.gameObject.SetActive(false);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -550,15 +575,21 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var left = start * with + originWith;
|
||||
var right = end * with + originWith;
|
||||
var rectTransform = area.gameObject.GetComponent<RectTransform>();
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var width = (float)(end - start)* 120F;
|
||||
rectTransform.DOSizeDelta(new Vector2((float)width+5f, 22), 1);
|
||||
#else
|
||||
var width = (float)(end - start)* 286F;
|
||||
rectTransform.DOSizeDelta(new Vector2((float)width+5f, 40), 1);
|
||||
#endif
|
||||
rectTransform.DOLocalMoveX((float)(left), 1);
|
||||
leftImage.GetComponent<RectTransform>().DOLocalMoveX((float)left, 1);
|
||||
rightImage.GetComponent<RectTransform>().DOLocalMoveX((float)right, 1);
|
||||
}
|
||||
}
|
||||
|
||||
#region 事件行为
|
||||
#region 事件行为
|
||||
|
||||
public void OnPointEnter(BaseEventData pointerEventData)
|
||||
{
|
||||
@@ -583,6 +614,6 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
GameObject resultPanel;
|
||||
public ChartDataSourceScript chartDataSourceScript { get; set; }
|
||||
public GraphChartBase graph { get; set; }
|
||||
|
||||
private float activeSeconds { get; set; }//移动端用户进入骑行超过2min,界面进入沉浸状态
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
@@ -80,12 +82,14 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
routeId = App.RouteIdParam > 0? App.RouteIdParam : 2633;
|
||||
//mapRoute = mapApi.GetById(routeId).data;
|
||||
//miniMap = transform.Find("MiniMap").gameObject;//小地图
|
||||
resultPanel = transform.Find("UI/Panel/ResultPanel").gameObject;
|
||||
//var panel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/Panel"), UIObject.transform);
|
||||
|
||||
//获取海拔图UI对象
|
||||
var graphObject = transform.Find("UI/Panel/GraphChart");
|
||||
chartDataSourceScript = graphObject.GetComponent<ChartDataSourceScript>();
|
||||
graph = graphObject.GetComponent<GraphChartBase>();
|
||||
//resultPanel = transform.Find("UI/Panel/ResultPanel").gameObject;
|
||||
|
||||
////获取海拔图UI对象
|
||||
//var graphObject = transform.Find("UI/Panel/GraphChart");
|
||||
//chartDataSourceScript = graphObject.GetComponent<ChartDataSourceScript>();
|
||||
//graph = graphObject.GetComponent<GraphChartBase>();
|
||||
|
||||
competitionId = App.CompetionId;
|
||||
App.CompetionId = 0;//清空比赛参数
|
||||
@@ -98,16 +102,38 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
Transform target;
|
||||
GameObject watcher;
|
||||
Transform uiParent;
|
||||
|
||||
GameObject uipanel { get; set; }
|
||||
private void Start()
|
||||
{
|
||||
UIManager.Instance.MainPanel = this.transform.Find("UI/Panel").GetComponent<PFUIPanel>();
|
||||
var uicanvasScaler = UIObject.GetComponent<CanvasScaler>();
|
||||
var loadingcanvasScaler = transform.Find("LoadingCanvas").GetComponent<CanvasScaler>();
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
uipanel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/Panel"), UIObject.transform);
|
||||
uicanvasScaler.referenceResolution = App.MobileResolution;
|
||||
loadingcanvasScaler.referenceResolution = App.MobileResolution;
|
||||
#else
|
||||
uipanel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/Panel"), UIObject.transform);
|
||||
uicanvasScaler.referenceResolution = App.PcResolution;
|
||||
loadingcanvasScaler.referenceResolution = App.PcResolution;
|
||||
#endif
|
||||
uipanel.transform.SetAsFirstSibling();
|
||||
uiParent = uipanel.transform;
|
||||
resultPanel = uiParent.Find("ResultPanel").gameObject;
|
||||
|
||||
//获取海拔图UI对象
|
||||
var graphObject = uiParent.Find("GraphChart");
|
||||
chartDataSourceScript = graphObject.GetComponent<ChartDataSourceScript>();
|
||||
graph = graphObject.GetComponent<GraphChartBase>();
|
||||
|
||||
UIManager.Instance.MainPanel = uipanel.GetComponent<PFUIPanel>();
|
||||
UIManager.Instance.ModalsPanel = this.transform.Find("UI/ModalPanel").GetComponent<PFUIPanel>();
|
||||
onlineUserPrefab = Resources.Load<GameObject>("UI/Prefab/Match/OnlinePlayer");
|
||||
miniMapPlayerPrefab = Resources.Load<GameObject>("UI/Prefab/Ride/MiniMapPlayer");
|
||||
watcher = Resources.Load<GameObject>("UI/Prefab/Match/Watcher");
|
||||
target = transform.Find("Target");
|
||||
miniMap = transform.Find("MiniMap").gameObject;//小地图
|
||||
uiParent = transform.Find("UI/Panel");
|
||||
|
||||
//进入倒计时
|
||||
singleUIManager = UIObject.GetComponent<BaseUIManager>();
|
||||
TrailRenderer trail = player.GetComponent<TrailRenderer>();
|
||||
@@ -142,9 +168,18 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
}
|
||||
}
|
||||
float timer = 1f;
|
||||
bool clearLock = false;
|
||||
private void Update()
|
||||
{
|
||||
//CamControl();
|
||||
var mouse = Input.GetMouseButton(0);
|
||||
if (mouse && clearLock)
|
||||
{
|
||||
clearLock = false;
|
||||
activeSeconds = 0;
|
||||
singleUIManager?.ClearPanel(null);
|
||||
}
|
||||
|
||||
timer -= Time.deltaTime;
|
||||
if (timer <= 0)//定时器 一秒执行一次
|
||||
{
|
||||
@@ -154,7 +189,16 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
{
|
||||
UIManager.SendCompetitionStartMessage("Ride");
|
||||
}
|
||||
timer = 1.0f;
|
||||
if (isStart)
|
||||
{
|
||||
activeSeconds++;
|
||||
}
|
||||
if (activeSeconds >= App.autoClearTimes && !clearLock)
|
||||
{
|
||||
clearLock = true;
|
||||
singleUIManager?.ClearPanel(null);
|
||||
}
|
||||
timer += 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +239,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
mapData = mapApi.GetData(routeId);//获取路书地理数据
|
||||
route = new Route(mapData, mapRoute);
|
||||
loadingController.AddProcess(10);
|
||||
#region 其他场景传参处理
|
||||
#region 其他场景传参处理
|
||||
//骑行结果
|
||||
if (App.routeResult != null )
|
||||
{
|
||||
@@ -221,7 +265,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
|
||||
App.routeResult = null;
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
////异步请求mapbox画出当前路书路线图
|
||||
//loadingController.DrawMapRouteAsync(mapRoute.Id);
|
||||
//loadingController.AddProcess(10);
|
||||
@@ -247,7 +291,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
mapData = mapApi.GetData(routeId);//获取路书地理数据
|
||||
route = new Route(mapData, mapRoute);
|
||||
loadingController.AddProcess(10);
|
||||
#region 其他场景传参处理
|
||||
#region 其他场景传参处理
|
||||
selectParamModel = new RouteResultParam
|
||||
{
|
||||
CompetitionId = competitionId,
|
||||
@@ -260,7 +304,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
RouteId = App.RouteIdParam
|
||||
};
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
//计算上次骑行距离调整地图中心点
|
||||
double endDistance = selectParamModel.EndDistance;
|
||||
@@ -394,7 +438,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
singleUIManager.ContinueRide();
|
||||
}
|
||||
|
||||
#region TCP相关
|
||||
#region TCP相关
|
||||
|
||||
public void TcpHandler()
|
||||
{
|
||||
@@ -489,7 +533,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
{
|
||||
return MapUDPService.GetCompetitionWatchers(competitionId);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
public void SetUIManager(PFUIPanel mainPanel, PFUIPanel model)
|
||||
{
|
||||
@@ -499,7 +543,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
|
||||
public void ReSetUIManager()
|
||||
{
|
||||
UIManager.Instance.MainPanel = this.transform.Find("UI/Panel").GetComponent<PFUIPanel>();
|
||||
UIManager.Instance.MainPanel = uipanel.GetComponent<PFUIPanel>();
|
||||
UIManager.Instance.ModalsPanel = this.transform.Find("UI/ModalPanel").GetComponent<PFUIPanel>();
|
||||
}
|
||||
|
||||
@@ -522,7 +566,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
return UIManager.Instance.loginRegOptions.GetCountryImageByName(name);
|
||||
}
|
||||
|
||||
#region 视角切换
|
||||
#region 视角切换
|
||||
|
||||
public AbstractMap map3d;
|
||||
public bool Is3dView;
|
||||
@@ -605,9 +649,9 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
trailRenderer.time = 30;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 游戏状态控制
|
||||
#region 游戏状态控制
|
||||
Stopwatch sw { get; set; }
|
||||
//开始骑行
|
||||
public void SetStart()
|
||||
@@ -619,6 +663,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
////骑行累计毫秒
|
||||
//sw = new Stopwatch();
|
||||
//sw.Start();
|
||||
activeSeconds = 0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -651,9 +696,9 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
isStart = false;
|
||||
isQuit = true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 数据处理
|
||||
#region 数据处理
|
||||
/// <summary>
|
||||
/// 当前骑行数据的记录器
|
||||
/// </summary>
|
||||
@@ -669,6 +714,11 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
return route;
|
||||
}
|
||||
|
||||
public GameObject GetUIPanel()
|
||||
{
|
||||
return uipanel;
|
||||
}
|
||||
|
||||
public MapDataModel GetMapData()
|
||||
{
|
||||
return mapData;
|
||||
@@ -796,5 +846,5 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
@@ -24,6 +24,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
GameObject _mipMapRoute;
|
||||
public RectTransform RectRoot;//rawImage
|
||||
TrailRenderer trail;
|
||||
Transform uitransform { get; set; }
|
||||
void Start()
|
||||
{
|
||||
cyclingCotroller = FindObjectOfType<CyclingController>();
|
||||
@@ -43,7 +44,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var screenBounds = GetScreenBounds();
|
||||
var z = SetZoomToFitBounds(targetbounds, screenBounds);
|
||||
}
|
||||
RectRoot = transform.parent.Find("UI/Panel/MiniMap/MiniMap").GetComponent<RectTransform>();
|
||||
uitransform = cyclingCotroller.GetUIPanel().transform;
|
||||
RectRoot = uitransform.Find("MiniMap/MiniMap").GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
trail = transform.parent.Find("Sphere").GetComponent<TrailRenderer>();
|
||||
@@ -57,7 +59,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
if (playerController != null)
|
||||
{
|
||||
var tr = transform.parent.Find("UI/Panel/MiniMap/MiniMap/arrow");
|
||||
var tr = uitransform.Find("MiniMap/MiniMap/arrow");
|
||||
tr.SetSiblingIndex(9999);
|
||||
var pos = _map.GeoToWorldPosition(playerController.Currentlatlong);
|
||||
pos.y += 15f;
|
||||
|
||||
@@ -25,8 +25,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
public override void InjectController(CyclingController controller)
|
||||
{
|
||||
|
||||
panel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Match/LoadingPanel"), transform);
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
panel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/LoadingPanel"), transform);
|
||||
#else
|
||||
panel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/LoadingPanel"), transform);
|
||||
#endif
|
||||
cyclingController = controller;
|
||||
PFUIPanel mainPanel = panel.GetComponent<PFUIPanel>();
|
||||
PFUIPanel modelPanel = transform.Find("ModalPanel").GetComponent<PFUIPanel>();
|
||||
@@ -44,6 +47,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
InitGameObject();
|
||||
InitGameObjectData();
|
||||
}
|
||||
GameObject enable3D { get; set; }
|
||||
protected override void InitGameObject()
|
||||
{
|
||||
base.InitGameObject();
|
||||
@@ -62,6 +66,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var route = cyclingController.mapRoute;
|
||||
#region 绑定路书基本信息
|
||||
//mapName.text = route.Name;
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
enable3D = panel.transform.Find("Enable3D").gameObject;
|
||||
enable3D.SetActive(route.Enable3D);
|
||||
#endif
|
||||
mapName.text = GetMaxString(route.Name, 40);
|
||||
level.text = route.Hard;
|
||||
elevaction.text = Math.Round(route.TotalClimb.GetValueOrDefault(0), 2).ToString() + "M";
|
||||
@@ -97,7 +105,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//创建排行榜
|
||||
public void CreateRankingList(List<MapRouteRanking> list)
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var prefab = Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/RankingItem");
|
||||
#else
|
||||
var prefab = Resources.Load<GameObject>("UI/Prefab/Ride/RankingItem");
|
||||
#endif
|
||||
var parent = panel.transform.Find("MapRanking");
|
||||
var title = panel.transform.Find("RankingTitle").gameObject;
|
||||
if (list.Count == 0)
|
||||
|
||||
@@ -10,12 +10,16 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
RectTransform RectRoot;
|
||||
GameObject arrow;
|
||||
Camera _minicamera;
|
||||
CyclingController cyclingController { get; set; }
|
||||
GameObject uipanel { get; set; }
|
||||
private void Awake()
|
||||
{
|
||||
cyclingController = FindObjectOfType<CyclingController>();
|
||||
uipanel = cyclingController.GetUIPanel();
|
||||
_map = transform.parent.Find("MiniMap").GetComponent<AbstractMap>();
|
||||
_minicamera = transform.parent.Find("MiniCamera").GetComponent<Camera>();
|
||||
RectRoot = transform.parent.Find("UI/Panel/MiniMap/MiniMap").GetComponent<RectTransform>();
|
||||
var parent = transform.parent.Find("UI/Panel/MiniMap/MiniMap");
|
||||
RectRoot = uipanel.transform.Find("MiniMap/MiniMap").GetComponent<RectTransform>();
|
||||
var parent = uipanel.transform.Find("MiniMap/MiniMap");
|
||||
arrow = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/MiniArrow"), parent);
|
||||
}
|
||||
public void SetController(AbstractPlayer player)
|
||||
|
||||
@@ -20,9 +20,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
parent = scroll.transform.Find("Viewport/Content");
|
||||
cyclingController = FindObjectOfType<CyclingController>();
|
||||
playerController = FindObjectOfType<PlayerController>();
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
nearByItem = Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/NearbyItem");
|
||||
nearByMajorItem = Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/NearbyMajorItem");
|
||||
#else
|
||||
nearByItem = Resources.Load<GameObject>("UI/Prefab/Ride/NearbyItem");
|
||||
nearByMajorItem = Resources.Load<GameObject>("UI/Prefab/Ride/NearbyMajorItem");
|
||||
|
||||
#endif
|
||||
Title = transform.Find("Title").GetComponent<Text>();
|
||||
OnlineUserNum = transform.Find("NearByView/OnlineUserNum").GetComponent<Text>();
|
||||
pageSize = 5;//开启无线下拉
|
||||
|
||||
@@ -25,14 +25,16 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
GameObject infoPanel;
|
||||
Image arrowImage;
|
||||
Transform uiObject;
|
||||
GameObject uipanel { get; set; }
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
base.Init();
|
||||
_playerController = FindObjectOfType<PlayerController>();
|
||||
tickOffset = mainController.preticks;
|
||||
uipanel = mainController.GetUIPanel();
|
||||
//创建UI
|
||||
uiObject = transform.parent.Find("UI/Panel/ArrowList");
|
||||
uiObject = uipanel.transform.Find("ArrowList");
|
||||
arrowImage = Instantiate(Resources.Load<Image>("UI/Prefab/Ride/ReviewArrow"), uiObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
#region 骑行逻辑
|
||||
TrailRenderer trail;
|
||||
GameObject uipanel { get; set; }
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
@@ -22,6 +23,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
UserId = App.CurrentUser.Id;
|
||||
totalDistance = mainController.selectParamModel.EndDistance;
|
||||
currentlatlong = mainController.GetCenterCoordinate();
|
||||
uipanel = mainController.GetUIPanel();
|
||||
trail = FindObjectOfType<TrailRenderer>();
|
||||
trail.startWidth = 1f;
|
||||
trail.endWidth = 1f;
|
||||
@@ -38,7 +40,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
trail.receiveShadows = false;
|
||||
trail.rayTracingMode = UnityEngine.Experimental.Rendering.RayTracingMode.Off;
|
||||
|
||||
headPanel = transform.parent.Find("UI/Panel/GraphChart/HeadPanel").gameObject;
|
||||
headPanel = uipanel.transform.Find("GraphChart/HeadPanel").gameObject;
|
||||
}
|
||||
TargetData targetData;
|
||||
/// <summary>
|
||||
@@ -56,7 +58,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
weight = App.CurrentUser.Weight;
|
||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||
//#if UNITY_EDITOR
|
||||
//power = 500;
|
||||
power = 500;
|
||||
//#endif
|
||||
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
reviewScrollView = transform.Find("ReviewArea").gameObject;
|
||||
content = transform.Find("ReviewArea/ReviewScrollView/Viewport/Content").gameObject;
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
reviewItem = Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/ReviewItem");
|
||||
#else
|
||||
reviewItem = Resources.Load<GameObject>("UI/Prefab/Ride/ReviewItem");
|
||||
#endif
|
||||
otherPlayer = Resources.Load<GameObject>("UI/Prefab/Ride/ReviewPlayer");
|
||||
miniMapPlayer = Resources.Load<GameObject>("UI/Prefab/Ride/MiniMapPlayer");
|
||||
playerController = FindObjectOfType<PlayerController>();
|
||||
|
||||
@@ -52,8 +52,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
cyclingController = FindObjectOfType<CyclingController>();
|
||||
//分页查询当前路数排行榜选手成绩列表
|
||||
parent = transform.Find("Panel/PlayerList/Scroll View/Viewport/Content");
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
prefab = Resources.Load<GameObject>("UI/Prefab/Ride/Mobile/SelectPlayerItem");
|
||||
#else
|
||||
prefab = Resources.Load<GameObject>("UI/Prefab/Ride/SelectPlayerItem");
|
||||
down = Resources.Load<Sprite>("Images/DOWN");
|
||||
#endif
|
||||
down = Resources.Load<Sprite>("Images/DOWN");
|
||||
up = Resources.Load<Sprite>("Images/UP");
|
||||
scroll = transform.Find("Panel/PlayerList/Scroll View").gameObject;
|
||||
content = transform.Find("Panel/PlayerList/Scroll View/Viewport/Content");
|
||||
@@ -128,6 +133,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
_startValue = Convert.ToDouble(input);
|
||||
}
|
||||
else
|
||||
{
|
||||
_startValue = 0;
|
||||
}
|
||||
}
|
||||
private void EndvalueChanged(string input)
|
||||
{
|
||||
@@ -135,6 +144,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
_endValue = Convert.ToDouble(input);
|
||||
}
|
||||
else
|
||||
{
|
||||
_endValue = 0;
|
||||
}
|
||||
}
|
||||
private void InputTextChanged(string input)
|
||||
{
|
||||
|
||||
@@ -7,17 +7,15 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
public class SingleUIManager : BaseUIManager
|
||||
{
|
||||
protected override void Awake()
|
||||
protected override void Start()
|
||||
{
|
||||
base.Awake();
|
||||
base.Start();
|
||||
|
||||
UIManager.AddEvent(startBtn.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, StartRide);
|
||||
UIManager.AddEvent(singleButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, SingleRide);
|
||||
UIManager.AddEvent(shadowButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, ShadowRide);
|
||||
UIManager.AddEvent(addButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, ShowSelectPlayer);
|
||||
}
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
selectPanel.SetActive(true);//显示选择单人、影子骑行模式
|
||||
}
|
||||
protected override void Update()
|
||||
|
||||
Reference in new issue
Block a user