修改设备图标。连接设备加缓存功能。

This commit is contained in:
suntao committed 2021-04-30 18:03:34 +08:00
1 parent 6399c26f7e
commit 9f4e446850
33 files changed
+594 -971

No files matched your search

+9 -2
View File
@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ANT_Managed_Library;
using Assets.Scripts.UI.Prefab.Device;
using UnityEngine;
namespace Assets.Scripts.Devices.Ant
@@ -45,13 +46,14 @@ namespace Assets.Scripts.Devices.Ant
public readonly List<AbstractAntDevice> discoveredDevices = new List<AbstractAntDevice>();
private Action<AbstractAntDevice> _action;
private static AntConnector _antConnector;
public static AntConnector Instance()
public static AntConnector Instance(Action<AbstractAntDevice> action = null)
{
if (_antConnector == null)
{
_antConnector = new AntConnector();
_antConnector._action = action;
}
return _antConnector;
@@ -310,6 +312,11 @@ namespace Assets.Scripts.Devices.Ant
//{
// device2.Connect();
//}
if(_action != null)
{
_action(device2);
}
}
return;
}