合并后微调,增加赛事提醒功能
This commit is contained in:
1 parent
21529db9dc
commit
7f8ac10d47
17 files changed
+1508
-25
No files matched your search
@@ -1056,6 +1056,8 @@ public class LoginController : MonoBehaviour
|
||||
}
|
||||
App.CurrentUser = data;
|
||||
App.RideSetting.Sensitivity = data.Sensitivity;
|
||||
//查询我参加的比赛
|
||||
UIManager.UpdateJoinCompetition();
|
||||
SceneManager.LoadScene("MainScene");
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -53,6 +53,11 @@ public class MainController : BaseScene
|
||||
{
|
||||
UIManager.ShowUserInfoPanel();
|
||||
}
|
||||
|
||||
if (App.MainSceneParam["Name"] == "RaceHomePanel")
|
||||
{
|
||||
UIManager.ShowRaceHomePanel();
|
||||
}
|
||||
App.MainSceneParam["Name"] = string.Empty;
|
||||
}
|
||||
else
|
||||
@@ -63,14 +68,21 @@ public class MainController : BaseScene
|
||||
//UIManager.ShowBigMapPanel();
|
||||
//UIManager.ShowEarthPanel();
|
||||
}
|
||||
|
||||
UIManager.UpdateJoinCompetition();//查询当前我参加的赛事
|
||||
}
|
||||
|
||||
|
||||
|
||||
float t = 1f;
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
t -= Time.deltaTime;
|
||||
while (t <= 0)
|
||||
{
|
||||
UIManager.SendCompetitionStartMessage("Main");
|
||||
t = 1;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task Login()
|
||||
|
||||
@@ -193,6 +193,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
this.gameObject.SetActive(false);
|
||||
this.Destroy();
|
||||
SceneManager.LoadScene("MainScene");
|
||||
App.MainSceneParam["Name"] = "RaceHomePanel";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
//显示倒计时面板信息
|
||||
//ShowCountDown(s.Item1, "remaining");
|
||||
ShowCountDown(cyclingController.currentPlayer.TotalTicks, "Riding Time");
|
||||
ShowCountDown(s.Item1, "Remaining Time");
|
||||
}
|
||||
//显示当前选手骑行时间
|
||||
Timer.gameObject.SetActive(true);
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
processText.text = $"{(f).ToString("#0")}%";
|
||||
});
|
||||
|
||||
if (process == 100)
|
||||
if (process >= 100)
|
||||
{
|
||||
rideNow.interactable = true;
|
||||
rideNow.enabled = true;
|
||||
|
||||
@@ -148,6 +148,10 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
if (timer <= 0)//定时器 一秒执行一次
|
||||
{
|
||||
TcpHandler();
|
||||
if (competitionId == 0)
|
||||
{
|
||||
UIManager.SendCompetitionStartMessage("Ride");
|
||||
}
|
||||
timer = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using System;
|
||||
|
||||
namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
@@ -65,4 +67,21 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
this.url = url;
|
||||
}
|
||||
}
|
||||
//赛事开始事件3
|
||||
public class CompetitonStartMessageEvent : GameEvent
|
||||
{
|
||||
public string title;//赛事标题
|
||||
public int competitionId;//赛事id
|
||||
public int routeId;//路书id
|
||||
public DateTime StartTime;//赛事开始时间
|
||||
|
||||
|
||||
public CompetitonStartMessageEvent(string Title, int Id, int RouteId, DateTime StartTime)
|
||||
{
|
||||
this.title = Title;
|
||||
this.competitionId = Id;
|
||||
this.routeId = RouteId;
|
||||
this.StartTime = StartTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user