Merge remote-tracking branch 'origin/dev_cyp' into dev_ani3
This commit is contained in:
commit
c579c1b130
BIN
Assets/Resources/Images/RowerNew/记录.png
Normal file
BIN
Assets/Resources/Images/RowerNew/记录.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
128
Assets/Resources/Images/RowerNew/记录.png.meta
Normal file
128
Assets/Resources/Images/RowerNew/记录.png.meta
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: eddfe4cfc129cc840a563f777ff91b7b
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -352,7 +352,7 @@
|
|||||||
"Customize": "自定义",
|
"Customize": "自定义",
|
||||||
"Rowing Machine": "划船机",
|
"Rowing Machine": "划船机",
|
||||||
"row distance": "里程",
|
"row distance": "里程",
|
||||||
"ROWER": "划船",
|
"ROWER": "划船记录",
|
||||||
"Rowing time": "划船时间",
|
"Rowing time": "划船时间",
|
||||||
"Rowing equipment": "划船设备",
|
"Rowing equipment": "划船设备",
|
||||||
"Re-Rowing": "重新划船",
|
"Re-Rowing": "重新划船",
|
||||||
|
|||||||
@ -97,6 +97,7 @@ namespace Assets.Scripts.Apis.Models
|
|||||||
public string Country { get; set; }
|
public string Country { get; set; }
|
||||||
public int Nid { get; set; }
|
public int Nid { get; set; }
|
||||||
public double Ticks { get; set; }
|
public double Ticks { get; set; }
|
||||||
|
public int rankNum { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Info
|
public class Info
|
||||||
@ -105,6 +106,7 @@ namespace Assets.Scripts.Apis.Models
|
|||||||
public string MyRank { get; set; }
|
public string MyRank { get; set; }
|
||||||
public int? Type { get; set; }
|
public int? Type { get; set; }
|
||||||
public string TypeStr { get; set; }
|
public string TypeStr { get; set; }
|
||||||
|
public string MyRankLeft { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RowerSegmentData
|
public class RowerSegmentData
|
||||||
|
|||||||
@ -51,5 +51,10 @@ namespace Assets.Scripts.Apis
|
|||||||
{
|
{
|
||||||
return await GetAsync<JsonResult<List<RowerRank>>>($"Rower/GetReRowShadowList?Id={id}");
|
return await GetAsync<JsonResult<List<RowerRank>>>($"Rower/GetReRowShadowList?Id={id}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<JsonResult<byte[]>> GetRecordSnapShot(string id)
|
||||||
|
{
|
||||||
|
return await GetAsync<JsonResult<byte[]>>($"Share/GetRowerRecordSnapShot?Id={id}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public static class App
|
|||||||
public static double longitude { get; internal set; }
|
public static double longitude { get; internal set; }
|
||||||
public static string is401 { get; set; }
|
public static string is401 { get; set; }
|
||||||
public static bool FromLogin => false;
|
public static bool FromLogin => false;
|
||||||
public static bool? _IsRowerMode = null;
|
private static bool? _IsRowerMode = null;
|
||||||
public static bool? IsRowerMode
|
public static bool? IsRowerMode
|
||||||
{
|
{
|
||||||
get => _IsRowerMode;
|
get => _IsRowerMode;
|
||||||
@ -234,7 +234,7 @@ public static class App
|
|||||||
//Host = "http://192.168.0.101:5087/";
|
//Host = "http://192.168.0.101:5087/";
|
||||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
//UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
||||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
//TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
||||||
Debug.unityLogger.logEnabled = false;
|
//Debug.unityLogger.logEnabled = false;
|
||||||
#else
|
#else
|
||||||
//Host = "http://pf.juze.pro/";
|
//Host = "http://pf.juze.pro/";
|
||||||
//Host = "http://192.168.0.101:5087/";
|
//Host = "http://192.168.0.101:5087/";
|
||||||
@ -243,7 +243,7 @@ public static class App
|
|||||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
//UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
||||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
//TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
||||||
#endif
|
#endif
|
||||||
Debug.Log(101 / 100 * 100);
|
var now = DateTime.Now;
|
||||||
if (!FB.IsInitialized)
|
if (!FB.IsInitialized)
|
||||||
{
|
{
|
||||||
FB.Init();
|
FB.Init();
|
||||||
|
|||||||
@ -71,7 +71,7 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
|
|||||||
List<ushort> r = new List<ushort>();
|
List<ushort> r = new List<ushort>();
|
||||||
for (int i = 3; i < data.Length; i += 2)
|
for (int i = 3; i < data.Length; i += 2)
|
||||||
{
|
{
|
||||||
ushort pull = Convert.ToUInt16(Math.Round(LbsToNewton(data[i], true)));//data[i] < 10 ? (ushort)0 : Convert.ToUInt16(Math.Round(LbsToNewton(data[i], true)));
|
ushort pull = data[i] < 5 ? (ushort)0 : Convert.ToUInt16(Math.Round(LbsToNewton(data[i], true)));
|
||||||
r.Add(pull);
|
r.Add(pull);
|
||||||
PullValue = pull;
|
PullValue = pull;
|
||||||
}
|
}
|
||||||
@ -155,23 +155,24 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
|
|||||||
/// 平均划桨频率
|
/// 平均划桨频率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int AverageStrokeRate { get; set; } = 0;
|
public int AverageStrokeRate { get; set; } = 0;
|
||||||
|
private UInt32 _totalDistance = 0;
|
||||||
public UInt32 TotalDistance { get; set; } = 0;
|
public UInt32 TotalDistance
|
||||||
public UInt16 _instantaneousPace = 0;
|
{
|
||||||
/// <summary>
|
get => _totalDistance;
|
||||||
/// 即时配速
|
|
||||||
/// </summary>
|
|
||||||
public UInt16 InstantaneousPace {
|
|
||||||
get => _instantaneousPace;
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_instantaneousPace == 0 && value != 0 && StartEvent != null)
|
if (_totalDistance == 0 && value != 0 && StartEvent != null)
|
||||||
{
|
{
|
||||||
StartEvent.Invoke(null, new EventArgs());
|
StartEvent.Invoke(null, new EventArgs());
|
||||||
}
|
}
|
||||||
_instantaneousPace = value;
|
_totalDistance = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//private UInt16 _instantaneousPace = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 即时配速
|
||||||
|
/// </summary>
|
||||||
|
public UInt16 InstantaneousPace { get; set; } = 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 平均配速
|
/// 平均配速
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -25,23 +25,24 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int AverageStrokeRate { get; set; } = 0;
|
public int AverageStrokeRate { get; set; } = 0;
|
||||||
|
|
||||||
public UInt32 TotalDistance { get; set; } = 0;
|
private UInt32 _totalDistance = 0;
|
||||||
public UInt16 _instantaneousPace = 0;
|
public UInt32 TotalDistance
|
||||||
/// <summary>
|
|
||||||
/// 即时配速
|
|
||||||
/// </summary>
|
|
||||||
public UInt16 InstantaneousPace
|
|
||||||
{
|
{
|
||||||
get => _instantaneousPace;
|
get => _totalDistance;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_instantaneousPace == 0 && value != 0 && StartEvent != null)
|
if (_totalDistance == 0 && value != 0 && StartEvent != null)
|
||||||
{
|
{
|
||||||
StartEvent.Invoke(null, new EventArgs());
|
StartEvent.Invoke(null, new EventArgs());
|
||||||
}
|
}
|
||||||
_instantaneousPace = value;
|
_totalDistance = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//private UInt16 _instantaneousPace = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 即时配速
|
||||||
|
/// </summary>
|
||||||
|
public UInt16 InstantaneousPace { get; set; } = 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 平均配速
|
/// 平均配速
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -118,7 +118,7 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
|||||||
if (characteristic.MatchGuid(ServiceUuids.Characteristics.RowerData))
|
if (characteristic.MatchGuid(ServiceUuids.Characteristics.RowerData))
|
||||||
{
|
{
|
||||||
var c = base.Characteristics.SingleOrDefault(x => x.Uuid == ServiceUuids.Characteristics.RowerData);
|
var c = base.Characteristics.SingleOrDefault(x => x.Uuid == ServiceUuids.Characteristics.RowerData);
|
||||||
if (c != null)
|
if (c != null && !C2RowerData.IsEnabled)
|
||||||
{
|
{
|
||||||
c.HandleAttributeReceived(response.Data);
|
c.HandleAttributeReceived(response.Data);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -297,9 +297,11 @@ public class MainController : BaseScene
|
|||||||
// UIManager.ShowHomePanel();
|
// UIManager.ShowHomePanel();
|
||||||
//});
|
//});
|
||||||
#if UNITY_ANDROID || UNITY_IOS
|
#if UNITY_ANDROID || UNITY_IOS
|
||||||
//隐藏骑行
|
|
||||||
|
#region 划船机功能:隐藏骑行
|
||||||
UIManager.ShowRowerPanel();
|
UIManager.ShowRowerPanel();
|
||||||
return;
|
return;
|
||||||
|
#endregion
|
||||||
if (!App.IsRowerMode.HasValue)
|
if (!App.IsRowerMode.HasValue)
|
||||||
{
|
{
|
||||||
UIManager.ShowHomePanel();
|
UIManager.ShowHomePanel();
|
||||||
|
|||||||
@ -50,7 +50,6 @@ public class PFUISlider : MonoBehaviour
|
|||||||
}
|
}
|
||||||
public void SetValue(float a)
|
public void SetValue(float a)
|
||||||
{
|
{
|
||||||
print("slider值" + a);
|
|
||||||
slider.value = a;
|
slider.value = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
using Assets.Scripts;
|
using Assets.Scripts;
|
||||||
using Assets.Scripts.Apis.Models;
|
using Assets.Scripts.Apis.Models;
|
||||||
|
using Facebook.Unity;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
#if UNITY_STANDALONE_WIN
|
#if UNITY_STANDALONE_WIN
|
||||||
@ -30,6 +32,9 @@ public class ActivityController : PFUIPanel
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
webView = browser.GetComponent<UniWebView>();
|
webView = browser.GetComponent<UniWebView>();
|
||||||
|
webView.Frame = new Rect(0, 0, Screen.width, Screen.height);
|
||||||
|
webView.ReferenceRectTransform = browser.GetComponent<RectTransform>();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
//webView.Show();
|
//webView.Show();
|
||||||
}
|
}
|
||||||
@ -89,10 +94,10 @@ public class ActivityController : PFUIPanel
|
|||||||
{
|
{
|
||||||
Debug.Log("开始");
|
Debug.Log("开始");
|
||||||
// Load a URL.
|
// Load a URL.
|
||||||
webView.Frame = new Rect(0, 0, Screen.width, Screen.height);
|
webView.Hide();
|
||||||
webView.ReferenceRectTransform = browser.GetComponent<RectTransform>();
|
|
||||||
webView.SetUserAgent($"UniWebView {Application.platform} {Application.version}");
|
webView.SetUserAgent($"UniWebView {Application.platform} {Application.version}");
|
||||||
webView.BackgroundColor = Utils.HexToColorHtml("#23232d");
|
webView.BackgroundColor = Utils.HexToColorHtml("#23232d");
|
||||||
|
//webView.CleanCache();
|
||||||
if (action == null)
|
if (action == null)
|
||||||
{
|
{
|
||||||
webView.Load(url);
|
webView.Load(url);
|
||||||
@ -113,6 +118,7 @@ public class ActivityController : PFUIPanel
|
|||||||
case "Close": CloseFunc(); break;
|
case "Close": CloseFunc(); break;
|
||||||
case "StartRide": StartRide(int.Parse(message.Args["id"]),message.Args.ContainsKey("routeResult")?message.Args["routeResult"]:null); break;
|
case "StartRide": StartRide(int.Parse(message.Args["id"]),message.Args.ContainsKey("routeResult")?message.Args["routeResult"]:null); break;
|
||||||
case "Share": Share(int.Parse(message.Args["type"]),int.Parse(message.Args["id"])); break;
|
case "Share": Share(int.Parse(message.Args["type"]),int.Parse(message.Args["id"])); break;
|
||||||
|
case "ShareRower": ShareRower(int.Parse(message.Args["type"]), message.Args["url"], message.Args["title"]); break;
|
||||||
case "OpenUrl": OpenUrl(message.Args["url"]); break;
|
case "OpenUrl": OpenUrl(message.Args["url"]); break;
|
||||||
default:break;
|
default:break;
|
||||||
}
|
}
|
||||||
@ -148,6 +154,33 @@ public class ActivityController : PFUIPanel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sharetype">0 1</param>
|
||||||
|
/// <param name="id">记录id</param>
|
||||||
|
/// <param name="type">rower ride</param>
|
||||||
|
private void ShareRower(int type, string url, string title)
|
||||||
|
{
|
||||||
|
if (type < 2)
|
||||||
|
{
|
||||||
|
if (App.weChatController.IsWeChatAppInstalled())
|
||||||
|
{
|
||||||
|
App.weChatController.ShareWebpageToWX(type, url, title, "By " + App.CurrentUser.Nickname, null);
|
||||||
|
RunJavaScript("window.postMessage(\"webview;Endshare\")");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Utils.showToast(null, "未安装微信");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FB.ShareLink(contentURL: new Uri(url),
|
||||||
|
contentTitle: title,
|
||||||
|
contentDescription: $"By {App.CurrentUser.Nickname}");
|
||||||
|
}
|
||||||
|
}
|
||||||
private void StartRide(int id,string routeResult)
|
private void StartRide(int id,string routeResult)
|
||||||
{
|
{
|
||||||
App.RouteIdParam = id;
|
App.RouteIdParam = id;
|
||||||
@ -162,6 +195,9 @@ public class ActivityController : PFUIPanel
|
|||||||
{
|
{
|
||||||
CancelInvoke("StartPageFunc");
|
CancelInvoke("StartPageFunc");
|
||||||
Close();
|
Close();
|
||||||
|
webView.LoadHTMLString("<div style=\"background:#23232d\" />", this.url);
|
||||||
|
//Destroy(gameObject);
|
||||||
|
//UIManager.Instance.mActivityController = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RunJavaScript(string js)
|
private void RunJavaScript(string js)
|
||||||
|
|||||||
@ -92,6 +92,15 @@ public class NewMainNav : MonoBehaviour
|
|||||||
/// <param name="flag"></param>
|
/// <param name="flag"></param>
|
||||||
public void SetExpand(bool flag)
|
public void SetExpand(bool flag)
|
||||||
{
|
{
|
||||||
|
if (flag)
|
||||||
|
{
|
||||||
|
autoClose = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
autoClose = false;
|
||||||
|
}
|
||||||
|
closeTime = 5f;
|
||||||
List<string> types = new List<string>();
|
List<string> types = new List<string>();
|
||||||
if (indexs != null)
|
if (indexs != null)
|
||||||
{
|
{
|
||||||
@ -172,7 +181,14 @@ public class NewMainNav : MonoBehaviour
|
|||||||
Utils.DisplayHead(transform.Find("Avatar").GetComponent<Image>(), App.CurrentUser.WxHeadImg);
|
Utils.DisplayHead(transform.Find("Avatar").GetComponent<Image>(), App.CurrentUser.WxHeadImg);
|
||||||
UIManager.AddEvent(transform.Find("Avatar").gameObject, EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("Avatar").gameObject, EventTriggerType.PointerClick, b =>
|
||||||
{
|
{
|
||||||
UIManager.ShowUserInfoPanel();
|
if (App.IsRowerMode == true)
|
||||||
|
{
|
||||||
|
UIManager.ShowEditUserPanel();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UIManager.ShowUserInfoPanel();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
UIManager.AddEvent(transform.Find("PF").gameObject, EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("PF").gameObject, EventTriggerType.PointerClick, b =>
|
||||||
{
|
{
|
||||||
@ -294,12 +310,19 @@ public class NewMainNav : MonoBehaviour
|
|||||||
}
|
}
|
||||||
bool isTouch = false;
|
bool isTouch = false;
|
||||||
float hideTime = 5;
|
float hideTime = 5;
|
||||||
|
|
||||||
|
bool autoClose = false;
|
||||||
|
float closeTime = 5;
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (Input.touchCount > 0)
|
if (Input.touchCount > 0)
|
||||||
{
|
{
|
||||||
isTouch = true;
|
isTouch = true;
|
||||||
|
if (autoClose)
|
||||||
|
{
|
||||||
|
closeTime = 5f;
|
||||||
|
}
|
||||||
GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||||
}
|
}
|
||||||
hideTime -= Time.deltaTime;
|
hideTime -= Time.deltaTime;
|
||||||
@ -317,16 +340,26 @@ public class NewMainNav : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Debug.Log("小时");
|
Debug.Log("小时");
|
||||||
delayTime = 0;
|
delayTime = 0;
|
||||||
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(0, 0.5f).onComplete = ()=>
|
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(0, 0.5f).onComplete = () =>
|
||||||
{
|
{
|
||||||
transform.Find("Delay/Tooltips").gameObject.SetActive(false);
|
transform.Find("Delay/Tooltips").gameObject.SetActive(false);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if(delayTime > 0)
|
else if (delayTime > 0)
|
||||||
{
|
{
|
||||||
Debug.Log(delayTime);
|
Debug.Log(delayTime);
|
||||||
delayTime -= Time.deltaTime;
|
delayTime -= Time.deltaTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeTime -= Time.deltaTime;
|
||||||
|
if (closeTime < 0)
|
||||||
|
{
|
||||||
|
if (autoClose)
|
||||||
|
{
|
||||||
|
Debug.Log("关一次");
|
||||||
|
SetExpand(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -229,8 +229,13 @@ public class EditUserController : PFUIPanel, INativeOnMobileImageSelect
|
|||||||
{"ContactPhone",mPhone.GetComponent<InputField>() },
|
{"ContactPhone",mPhone.GetComponent<InputField>() },
|
||||||
{"ContactAddress",mAddr.GetComponent<InputField>() },
|
{"ContactAddress",mAddr.GetComponent<InputField>() },
|
||||||
};
|
};
|
||||||
|
#region 划船机功能:隐藏骑行相关的
|
||||||
|
if (App.IsRowerMode == true)
|
||||||
|
{
|
||||||
|
transform.Find("Panel/MainPanel/BW").gameObject.SetActive(false);
|
||||||
|
transform.Find("Panel/MainPanel/WD").gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
async Task Login()
|
async Task Login()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,7 +39,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Rower != null ? (C2RowerData.IsEnabled == true ? (IRowerCommonData)Rower.c2RowerData : (IRowerCommonData)Rower.rowerData) : null;
|
return Rower != null ? (C2RowerData.IsEnabled == true ? (IRowerCommonData)(Rower.c2RowerData) : (IRowerCommonData)(Rower.rowerData)) : null;
|
||||||
//var device = App.MainDeviceAdapter.GetDevices().FirstOrDefault(d => (d.State == DeviceState.Connected) && d.Sensor == SensorType.Rower);
|
//var device = App.MainDeviceAdapter.GetDevices().FirstOrDefault(d => (d.State == DeviceState.Connected) && d.Sensor == SensorType.Rower);
|
||||||
//if (device != null)
|
//if (device != null)
|
||||||
//{
|
//{
|
||||||
@ -118,7 +118,8 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
Id = Guid.NewGuid().ToString();
|
Id = Guid.NewGuid().ToString();
|
||||||
rowerType = new RowerType();
|
rowerType = new RowerType() { type = 1, value = 500 };
|
||||||
|
|
||||||
spriteDict = new Dictionary<object, Sprite>()
|
spriteDict = new Dictionary<object, Sprite>()
|
||||||
{
|
{
|
||||||
{"Start",Resources.Load<Sprite>("Images/RowerNew/ICON_continue_44") },
|
{"Start",Resources.Load<Sprite>("Images/RowerNew/ICON_continue_44") },
|
||||||
@ -216,7 +217,8 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
{
|
{
|
||||||
//UIManager.ShowRowerWelldone("33171855-66FC-4121-935C-0F4DA98E5BB2", Init);
|
//UIManager.ShowRowerWelldone("33171855-66FC-4121-935C-0F4DA98E5BB2", Init);
|
||||||
//return;
|
//return;
|
||||||
//UIManager.ShowRowerWelldone("1915400E-A6E5-4FB7-B371-7240BEA20A54", Init);
|
|
||||||
|
//UIManager.ShowRowerWelldone("C0F81E83-120B-4A2C-AD0E-8BC1B8EB3E74", Init);
|
||||||
//return;
|
//return;
|
||||||
if (checkRowing()) return;
|
if (checkRowing()) return;
|
||||||
if (C2RowerData.IsEnabled == true && C2RowerData.rowerType != null) return;
|
if (C2RowerData.IsEnabled == true && C2RowerData.rowerType != null) return;
|
||||||
@ -226,13 +228,17 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
HandleSelectType();
|
HandleSelectType();
|
||||||
},rowerType);
|
},rowerType);
|
||||||
}, false);
|
}, false);
|
||||||
btnStart = transform.Find("MainNav-mobile/Custom2").gameObject;
|
var c2 = new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/RowerNew/记录"), () =>
|
||||||
var c3 = new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/RowerNew/ICON_mode_44"), () =>
|
|
||||||
{
|
{
|
||||||
ReturnHome();
|
UIManager.ShowResultListPanel();
|
||||||
}, false);
|
}, false);
|
||||||
|
btnStart = transform.Find("MainNav-mobile/Custom2").gameObject;
|
||||||
|
//var c3 = new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/RowerNew/ICON_mode_44"), () =>
|
||||||
|
//{
|
||||||
|
// ReturnHome();
|
||||||
|
//}, false);
|
||||||
//隐藏骑行
|
//隐藏骑行
|
||||||
nav.SetButtonActive(new List<int> { 3, 7 }, null, c1, null, null, false);
|
nav.SetButtonActive(new List<int> { 3, 7 }, null, c1, null, c2, false);
|
||||||
newNav = nav;
|
newNav = nav;
|
||||||
#endif
|
#endif
|
||||||
UIManager.AddEvent(transform.Find("Stopped/Confirm/BtnSave").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("Stopped/Confirm/BtnSave").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||||
@ -251,6 +257,8 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
RowerData.StartEvent -= StartFunc;
|
RowerData.StartEvent -= StartFunc;
|
||||||
RowerData.StartEvent += StartFunc;
|
RowerData.StartEvent += StartFunc;
|
||||||
}
|
}
|
||||||
|
rowerType = new RowerType { type = 1, value = 500 };
|
||||||
|
HandleSelectType();
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,7 +421,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
{
|
{
|
||||||
startTime = UIManager.Now.GetDateTime();
|
startTime = UIManager.Now.GetDateTime();
|
||||||
createTime = null;
|
createTime = null;
|
||||||
truelyTime = 0;
|
truelyTime = historyTime;
|
||||||
//TimerTicks();
|
//TimerTicks();
|
||||||
openTimer = true;
|
openTimer = true;
|
||||||
timer = 1.0f;
|
timer = 1.0f;
|
||||||
@ -619,7 +627,10 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
leftLine.localPosition = new Vector3(-207.5f+43, leftLine.localPosition.y, leftLine.localPosition.z);
|
leftLine.localPosition = new Vector3(-207.5f+43, leftLine.localPosition.y, leftLine.localPosition.z);
|
||||||
rightLine.localPosition = new Vector3(164.5f+43, rightLine.localPosition.y, rightLine.localPosition.z);
|
rightLine.localPosition = new Vector3(164.5f+43, rightLine.localPosition.y, rightLine.localPosition.z);
|
||||||
finishLine.localPosition = new Vector3(-237.5f+43, finishLine.localPosition.y, finishLine.localPosition.z);
|
finishLine.localPosition = new Vector3(-237.5f+43, finishLine.localPosition.y, finishLine.localPosition.z);
|
||||||
|
historyStrokeCount = 0;
|
||||||
|
historyDistance = 0;
|
||||||
|
historyTime = 0;
|
||||||
|
historyEnergy = 0;
|
||||||
|
|
||||||
Resources.UnloadUnusedAssets();
|
Resources.UnloadUnusedAssets();
|
||||||
GC.Collect();
|
GC.Collect();
|
||||||
@ -643,12 +654,10 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
|
|
||||||
private void ResChanged(object sender, EventArgs e)
|
private void ResChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
print("收到阻力" + sender);
|
|
||||||
if ((Convert.ToSingle(sender) >= 50) && slider)
|
if ((Convert.ToSingle(sender) >= 50) && slider)
|
||||||
{
|
{
|
||||||
slider.GetComponent<PFUISlider>().SetValue((Convert.ToSingle(sender) - 50) / 300f);
|
slider.GetComponent<PFUISlider>().SetValue((Convert.ToSingle(sender) - 50) / 300f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -697,16 +706,18 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
#endif
|
#endif
|
||||||
var heartRate = HeartRate ?? 0;
|
var heartRate = HeartRate ?? 0;
|
||||||
bottom.Find("BPM/Value").GetComponent<Text>().text = heartRate.ToString();
|
bottom.Find("BPM/Value").GetComponent<Text>().text = heartRate.ToString();
|
||||||
var distance = (int)RowerData.TotalDistance;
|
//断线重连继续
|
||||||
var energy = RowerData.TotalEnergy;
|
var distance = (int)RowerData.TotalDistance + historyDistance;
|
||||||
var strokeCount = RowerData.StrokeCount;
|
var energy = RowerData.TotalEnergy + historyEnergy;
|
||||||
|
var strokeCount = RowerData.StrokeCount + historyStrokeCount;
|
||||||
|
|
||||||
var power = RowerData.InstantaneousPower;
|
var power = RowerData.InstantaneousPower;
|
||||||
var rate = RowerData.StrokeRate;
|
var rate = RowerData.StrokeRate;
|
||||||
truelyTime++;
|
truelyTime++;
|
||||||
TempRowerCalc tmpdata = null;
|
TempRowerCalc tmpdata = null;
|
||||||
|
|
||||||
//里程停止逻辑
|
//里程停止逻辑
|
||||||
if (totalDistance == RowerData.TotalDistance)
|
if (totalDistance == RowerData.TotalDistance + historyDistance)
|
||||||
{
|
{
|
||||||
//判定一次停止
|
//判定一次停止
|
||||||
stopSeconds++;
|
stopSeconds++;
|
||||||
@ -853,6 +864,8 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//检查本地数据
|
//检查本地数据
|
||||||
|
int historyDistance = 0,historyStrokeCount = 0,historyEnergy = 0;
|
||||||
|
public int historyTime = 0;
|
||||||
private void CheckLocalData()
|
private void CheckLocalData()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -875,6 +888,24 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
{
|
{
|
||||||
records.Add(item);
|
records.Add(item);
|
||||||
}
|
}
|
||||||
|
//records.Add($"{strokeCount},{RowerData.ElapsedTime},{distance},{power},{pace},{rate},{RowerData.ResistanceLevel},{heartRate},{energy},{RowerData.AveragePower},{truelyTime}");
|
||||||
|
var _re = records.LastOrDefault();
|
||||||
|
if (!string.IsNullOrEmpty(_re))
|
||||||
|
{
|
||||||
|
var datas = _re.Split(',');
|
||||||
|
historyStrokeCount = int.Parse(datas[0]);
|
||||||
|
historyDistance = int.Parse(datas[2]);
|
||||||
|
historyTime = int.Parse(datas[10]);
|
||||||
|
seconds = historyTime;
|
||||||
|
historyEnergy = int.Parse(datas[8]);
|
||||||
|
var historyRowerType = PlayerPrefs.GetString("historyRowerType");
|
||||||
|
if (!string.IsNullOrEmpty(historyRowerType))
|
||||||
|
{
|
||||||
|
var typeObject = historyRowerType.Split(',');
|
||||||
|
rowerType = new RowerType() { type = int.Parse(typeObject[0]), value = float.Parse(typeObject[1]) };
|
||||||
|
HandleSelectType();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
UIManager.CloseConfirm();
|
UIManager.CloseConfirm();
|
||||||
}, 2,
|
}, 2,
|
||||||
@ -905,6 +936,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
Directory.CreateDirectory(dir);
|
Directory.CreateDirectory(dir);
|
||||||
}
|
}
|
||||||
File.WriteAllText(path, string.Join("\r\n", records));
|
File.WriteAllText(path, string.Join("\r\n", records));
|
||||||
|
PlayerPrefs.SetString("historyRowerType", $"{rowerType.type},{rowerType.value}");
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -119,6 +119,19 @@ public class ResultListController : PFUIPanel
|
|||||||
#if UNITY_ANDROID || UNITY_IOS
|
#if UNITY_ANDROID || UNITY_IOS
|
||||||
GetList(2);
|
GetList(2);
|
||||||
#endif
|
#endif
|
||||||
|
#region 划船机功能:隐藏骑行记录
|
||||||
|
#if UNITY_ANDROID || UNITY_IOS
|
||||||
|
btnRower.transform.localPosition = new Vector3(btnRower.transform.localPosition.x, btnRoute.transform.localPosition.y, btnRower.transform.localPosition.z);
|
||||||
|
btnRoute.gameObject.SetActive(false);
|
||||||
|
btnMatch.gameObject.SetActive(false);
|
||||||
|
transform.Find("ListPanel/Line").gameObject.SetActive(false);
|
||||||
|
transform.Find("ListPanel/Line2").gameObject.SetActive(false);
|
||||||
|
StartScroll(2);
|
||||||
|
//scrollContent.localPosition = new Vector3(674 * -2, scrollContent.localPosition.y, scrollContent.localPosition.z);//.DOLocalMoveX(674 * index * -1, 0.3f);
|
||||||
|
//btnRower.GetComponent<Text>().color = Utils.HexToColor("#ffffff");
|
||||||
|
#endif
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Load()
|
public void Load()
|
||||||
@ -177,6 +190,7 @@ public class ResultListController : PFUIPanel
|
|||||||
Load();
|
Load();
|
||||||
StartScroll(1);
|
StartScroll(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Dictionary<int, bool> isEnd = new Dictionary<int, bool>
|
Dictionary<int, bool> isEnd = new Dictionary<int, bool>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -129,7 +129,13 @@ public class RouteItem : MonoBehaviour
|
|||||||
{
|
{
|
||||||
UIManager.AddEvent(btnDetail.gameObject, EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(btnDetail.gameObject, EventTriggerType.PointerClick, b =>
|
||||||
{
|
{
|
||||||
|
//UIManager.ShowActivityPanel("http://192.168.0.101:3081/rower/record/27C0BE5C-3818-45D0-A2FD-681AC2ACFB64?UserId=16650");
|
||||||
|
#if UNITY_ANDROID || UNITY_IOS
|
||||||
|
UIManager.ShowActivityPanel($"{App.websiteDict[App.Host]}rower/record/{result.Id}?UserId={App.CurrentUser.Id}");
|
||||||
|
#else
|
||||||
Application.OpenURL($"{App.websiteDict[App.Host]}rower/record/{result.Id}?Token={App.CurrentUser.cookie}");
|
Application.OpenURL($"{App.websiteDict[App.Host]}rower/record/{result.Id}?Token={App.CurrentUser.cookie}");
|
||||||
|
#endif
|
||||||
|
//Application.OpenURL($"{App.websiteDict[App.Host]}rower/record/{result.Id}?Token={App.CurrentUser.cookie}");
|
||||||
//UIManager.ShowRowerResult(result.Id);
|
//UIManager.ShowRowerResult(result.Id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -201,7 +201,7 @@ public class RowerMultiModeScript : MonoBehaviour
|
|||||||
public async void GetShadowList(RowerTaskPanel.RowerType rowerType, RowerResultModel reRowData)
|
public async void GetShadowList(RowerTaskPanel.RowerType rowerType, RowerResultModel reRowData)
|
||||||
{
|
{
|
||||||
this.rowerType = rowerType;
|
this.rowerType = rowerType;
|
||||||
currentSecond = -1;
|
currentSecond = GetComponent<RowerHomeScript>().historyTime - 1;
|
||||||
//if(Application.internetReachability == NetworkReachability.NotReachable)
|
//if(Application.internetReachability == NetworkReachability.NotReachable)
|
||||||
var res = reRowData ==null? await ConfigHelper.rowerApi.GetShadowList(rowerType): await ConfigHelper.rowerApi.GetReRowShadowList(reRowData.Id);
|
var res = reRowData ==null? await ConfigHelper.rowerApi.GetShadowList(rowerType): await ConfigHelper.rowerApi.GetReRowShadowList(reRowData.Id);
|
||||||
shadowList = res.data;
|
shadowList = res.data;
|
||||||
|
|||||||
@ -40,18 +40,22 @@ public class RowerWelldone : PFUIPanel
|
|||||||
UIManager.AddEvent(transform.Find("Container/BtnView").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("Container/BtnView").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||||
{
|
{
|
||||||
CloseModal();
|
CloseModal();
|
||||||
|
#if UNITY_ANDROID || UNITY_IOS
|
||||||
|
UIManager.ShowActivityPanel($"{App.websiteDict[App.Host]}rower/record/{id}?UserId={App.CurrentUser.Id}");
|
||||||
|
#else
|
||||||
Application.OpenURL($"{App.websiteDict[App.Host]}rower/record/{id}?Token={App.CurrentUser.cookie}");
|
Application.OpenURL($"{App.websiteDict[App.Host]}rower/record/{id}?Token={App.CurrentUser.cookie}");
|
||||||
|
#endif
|
||||||
});
|
});
|
||||||
UIManager.AddEvent(transform.Find("Container/Share/Wx").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("Container/Share/Wx").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||||
{
|
{
|
||||||
if (data == null) return;
|
if (data == null) return;
|
||||||
App.weChatController.ShareWebpageToWX(0, $"{App.websiteDict[App.Host]}rower/record/{id}?UserId={App.CurrentUser.Id}", $"PowerFun {data.info.TypeStr} Rowing", $"By {App.CurrentUser.Nickname}",null);
|
App.weChatController.ShareWebpageToWX(0, $"{App.websiteDict[App.Host]}rower/record/{id}?UserId={App.CurrentUser.Id}", $"我在{data.info.TypeStr}的划船比赛中获得第{data.info.MyRankLeft}名!赶紧来一起划船吧!", $"By {App.CurrentUser.Nickname}", null);
|
||||||
});
|
});
|
||||||
|
|
||||||
UIManager.AddEvent(transform.Find("Container/Share/WxMoment").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("Container/Share/WxMoment").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||||
{
|
{
|
||||||
if (data == null) return;
|
if (data == null) return;
|
||||||
App.weChatController.ShareWebpageToWX(1, $"{App.websiteDict[App.Host]}rower/record/{id}?UserId={App.CurrentUser.Id}", $"PowerFun {data.info.TypeStr} Rowing", $"By {App.CurrentUser.Nickname}", null);
|
App.weChatController.ShareWebpageToWX(1, $"{App.websiteDict[App.Host]}rower/record/{id}?UserId={App.CurrentUser.Id}", $"我在{data.info.TypeStr}的划船比赛中获得第{data.info.MyRankLeft}名!赶紧来一起划船吧!", $"By {App.CurrentUser.Nickname}", null);
|
||||||
});
|
});
|
||||||
|
|
||||||
UIManager.AddEvent(transform.Find("Container/Share/Fb").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("Container/Share/Fb").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||||
@ -117,7 +121,7 @@ public class RowerWelldone : PFUIPanel
|
|||||||
{
|
{
|
||||||
var item = data.ranks[i];
|
var item = data.ranks[i];
|
||||||
var game = Instantiate<GameObject>(Rank);
|
var game = Instantiate<GameObject>(Rank);
|
||||||
game.transform.Find("Content/Rank").GetComponent<Text>().text = (i + 1).ToString("00");
|
game.transform.Find("Content/Rank").GetComponent<Text>().text = item.rankNum.ToString("00");
|
||||||
game.transform.Find("Content/NickName").GetComponent<Text>().text = item.NickName;
|
game.transform.Find("Content/NickName").GetComponent<Text>().text = item.NickName;
|
||||||
Utils.DisplayImageTempDict(game.transform.Find("Content/Avatar").GetComponent<RawImage>(), item.WxHeadImg, caches);
|
Utils.DisplayImageTempDict(game.transform.Find("Content/Avatar").GetComponent<RawImage>(), item.WxHeadImg, caches);
|
||||||
game.transform.Find("Content/Time").GetComponent<Text>().text = data.info.Type == 1 ? TimeSpan.FromSeconds(item.Ticks).ToString(@"hh\:mm\:ss") : item.TotalDistance.ToString("#0M");
|
game.transform.Find("Content/Time").GetComponent<Text>().text = data.info.Type == 1 ? TimeSpan.FromSeconds(item.Ticks).ToString(@"hh\:mm\:ss") : item.TotalDistance.ToString("#0M");
|
||||||
|
|||||||
@ -437,8 +437,8 @@ public class UIManager : MonoBehaviour
|
|||||||
}
|
}
|
||||||
public static void ShowActivityPanel(string url)
|
public static void ShowActivityPanel(string url)
|
||||||
{
|
{
|
||||||
UIManager.Show(UIManager.Instance.ActivityController, null, true);
|
|
||||||
UIManager.Instance.ActivityController.Initial(url);
|
UIManager.Instance.ActivityController.Initial(url);
|
||||||
|
UIManager.Show(UIManager.Instance.ActivityController, null, true);
|
||||||
}
|
}
|
||||||
//活动弹窗
|
//活动弹窗
|
||||||
ActivityAdController mActivityAdController;
|
ActivityAdController mActivityAdController;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user