赛事界面&骑行界面调整
This commit is contained in:
1 parent
3fb8aee922
commit
7af935118e
50 files changed
+20950
-426
No files matched your search
@@ -251,7 +251,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
private Vector3 m = new Vector3(0.1f, 0.1f, 0.1f);
|
||||
private Vector3 CameraVector = Vector3.zero;
|
||||
|
||||
GameObject uipanel { get; set; }
|
||||
public GameObject uipanel { get; set; }
|
||||
public void InitData()
|
||||
{
|
||||
playerController = FindObjectOfType<PlayerController>();
|
||||
@@ -493,7 +493,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
//进入简约模式
|
||||
protected int isSimple = 1;
|
||||
protected bool clearLock = true;
|
||||
public bool clearLock = true;
|
||||
public virtual void ClearPanel(BaseEventData baseEventData)
|
||||
{
|
||||
if (clearLock)
|
||||
|
||||
@@ -172,12 +172,15 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
private void Update()
|
||||
{
|
||||
//CamControl();
|
||||
var mouse = Input.GetMouseButton(0);
|
||||
if (mouse && clearLock)
|
||||
if (competitionId == 0 && singleUIManager != null)
|
||||
{
|
||||
clearLock = false;
|
||||
activeSeconds = 0;
|
||||
singleUIManager?.ClearPanel(null);
|
||||
var mouse = Input.GetMouseButton(0);
|
||||
if (mouse && clearLock && singleUIManager.clearLock)
|
||||
{
|
||||
clearLock = false;
|
||||
activeSeconds = 0;
|
||||
singleUIManager?.ClearPanel(null);
|
||||
}
|
||||
}
|
||||
|
||||
timer -= Time.deltaTime;
|
||||
@@ -195,8 +198,11 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
}
|
||||
if (activeSeconds >= App.autoClearTimes && !clearLock)
|
||||
{
|
||||
clearLock = true;
|
||||
singleUIManager?.ClearPanel(null);
|
||||
if (competitionId == 0)
|
||||
{
|
||||
clearLock = true;
|
||||
singleUIManager?.ClearPanel(null);
|
||||
}
|
||||
}
|
||||
timer += 1.0f;
|
||||
}
|
||||
|
||||
@@ -28,10 +28,15 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
currentlatlong = mainController.GetCenterCoordinate();
|
||||
_playerController = FindObjectOfType<PlayerController>();
|
||||
//创建UI
|
||||
uiObject = transform.parent.Find("UI/Panel/ArrowList");
|
||||
var uipanel = mainController.GetUIPanel();
|
||||
uiObject = uipanel.transform.Find("ArrowList");
|
||||
if (mainController.cyclingController.Mode == CyclingModel.Competition)
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
arrowImage = Instantiate(Resources.Load<Image>("UI/Prefab/Match/Mobile/CompetitionArrow"), uiObject);
|
||||
#else
|
||||
arrowImage = Instantiate(Resources.Load<Image>("UI/Prefab/Match/CompetitionArrow"), uiObject);
|
||||
#endif
|
||||
//比赛模式
|
||||
if (!string.IsNullOrEmpty(headUrl))
|
||||
{
|
||||
|
||||
@@ -57,9 +57,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
cadance = mainController.UpdateCadence();
|
||||
weight = App.CurrentUser.Weight;
|
||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||
//#if UNITY_EDITOR
|
||||
#if UNITY_EDITOR
|
||||
power = 500;
|
||||
//#endif
|
||||
#endif
|
||||
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in new issue
Block a user