骑行数据逻辑调整

This commit is contained in:
lishuo committed 2021-04-27 20:28:03 +08:00
1 parent 8226b8a7c2
commit 00b9c7e796
15 files changed
+4173 -21344

No files matched your search

@@ -0,0 +1,31 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Assets.Scenes.Ride.Scripts
{
public class NoDeviceScript: MonoBehaviour
{
Button cancelButton;
Button confirmButton;
CyclingController cyclingController;
private void Start()
{
cyclingController = FindObjectOfType<CyclingController>();
cancelButton = transform.Find("CloseButton").GetComponent<Button>();
confirmButton = transform.Find("SaveButton").GetComponent<Button>();
UIManager.AddEvent(cancelButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, Cancel);
UIManager.AddEvent(confirmButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, Confirm);
}
private void Cancel(BaseEventData baseEventData)
{
transform.gameObject.SetActive(false);
}
private void Confirm(BaseEventData baseEventData)
{
transform.gameObject.SetActive(false);
var pFUIPanel = transform.parent.GetComponent<PFUIPanel>();
cyclingController.ShowDevice(pFUIPanel);
}
}
}