登录增加loading&赛事提醒修改
This commit is contained in:
1 parent
51cea743be
commit
dfb80658dd
23 files changed
+2137
-34355
No files matched your search
@@ -384,8 +384,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
if (mainController.competitionId > 0)
|
||||
{
|
||||
var showLeft = watchList.Count > 0;
|
||||
viewButton.enabled = true;
|
||||
viewButton.interactable = true;
|
||||
//viewButton.enabled = true;
|
||||
//viewButton.interactable = true;
|
||||
distanceIconCompetition.SetActive(!showLeft);
|
||||
totalDistanceCompetition.gameObject.SetActive(!showLeft);
|
||||
totalDistance.gameObject.SetActive(showLeft);
|
||||
|
||||
@@ -93,11 +93,13 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
|
||||
competitionId = App.CompetionId;
|
||||
App.CompetionId = 0;//清空比赛参数
|
||||
Resources.UnloadUnusedAssets();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
App.TextureCache.Clear();
|
||||
//App.TextureCache.Clear();
|
||||
Resources.UnloadUnusedAssets();
|
||||
}
|
||||
Transform target;
|
||||
GameObject watcher;
|
||||
@@ -437,7 +439,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
chartDataSourceScript.InitHorizontalScrolling(index);
|
||||
}
|
||||
//SingleUIManager singleUIManager;
|
||||
BaseUIManager singleUIManager;
|
||||
public BaseUIManager singleUIManager;
|
||||
public void GameStart()
|
||||
{
|
||||
singleUIManager.StartRide();
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
public class GameEvent { }
|
||||
public class GameEvent { string key { get; set; } }
|
||||
|
||||
public class EventQueueSystem : MonoSingleton<EventQueueSystem>
|
||||
{
|
||||
@@ -25,7 +26,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//注册侦听事件(持续)
|
||||
public static void AddListener<T>(EventDelegate<T> del) where T : GameEvent
|
||||
{
|
||||
Instance.AddDelegate(del);
|
||||
if (!HasListener(del))
|
||||
{
|
||||
Debug.Log(30);
|
||||
Instance.AddDelegate(del);
|
||||
}
|
||||
}
|
||||
|
||||
//注册侦听事件(一次)
|
||||
@@ -39,7 +44,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//判定侦听事件是否存在
|
||||
public static bool HasListener<T>(EventDelegate<T> del) where T : GameEvent
|
||||
{
|
||||
return Instance.delegateLookup.ContainsKey(del);
|
||||
return Instance.delegateLookup.Keys.Where(c => c.GetType() == del.GetType()).Any();
|
||||
//return Instance.delegateLookup.ContainsKey(del);
|
||||
}
|
||||
|
||||
//移除侦听事件
|
||||
@@ -114,6 +120,18 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
return;
|
||||
Instance.eventQueue.Enqueue(e);
|
||||
}
|
||||
static List<string> keyList = new List<string>();
|
||||
|
||||
public static void QueueEventOnce(GameEvent e,string key)
|
||||
{
|
||||
if (!Instance.delegates.ContainsKey(e.GetType()))
|
||||
return;
|
||||
if (keyList.Contains(key))
|
||||
return;
|
||||
keyList.Add(key);
|
||||
Debug.Log(126);
|
||||
Instance.eventQueue.Enqueue(e);
|
||||
}
|
||||
float timer = 0.0f;
|
||||
//事件队列触发处理
|
||||
void Update()
|
||||
|
||||
Reference in new issue
Block a user