合并后微调,增加赛事提醒功能

This commit is contained in:
lishuo committed 2021-07-23 18:07:12 +08:00
1 parent 21529db9dc
commit 7f8ac10d47
17 files changed
+1508 -25

No files matched your search

@@ -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;
}
}
}