Merge branch 'dev_cyp' into dev_ar_cyp
# Conflicts: # Assets/Resources/UI/Font/HanWangZonYi.ttf.meta # Assets/Resources/UI/language.json # Assets/Scenes/Login.unity # Assets/Scripts/Apis/Models/MapRoute.cs # Assets/Scripts/App.cs # Assets/Scripts/ConfigHelper.cs # Assets/Scripts/Scenes/Ride/Scripts/PlayerController.cs # Assets/Scripts/UIManager.cs # Assets/Scripts/Utils/Utils.cs
This commit is contained in:
commit
e513eeac5c
301 files changed
+49814
-11770
No files matched your search
@@ -78,8 +78,8 @@ public class Toast : MonoBehaviour
|
||||
}
|
||||
//Fade out
|
||||
yield return fadeInAndOut(txt, false, 0.5f);
|
||||
|
||||
gameObject.SetActive(false);
|
||||
DestroyImmediate(gameObject);
|
||||
//gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
IEnumerator fadeInAndOut(Text targetText, bool fadeIn, float duration)
|
||||
|
||||
@@ -21,6 +21,25 @@ namespace Assets.Scripts
|
||||
|
||||
public static class Utils
|
||||
{
|
||||
public static string ToPFString(this TimeSpan t)
|
||||
{
|
||||
if (t.TotalSeconds >= 60)
|
||||
{
|
||||
var s = "00:00:00";
|
||||
var r = t.ToString(@"hh\:mm\:ss");
|
||||
int i = 0;
|
||||
for (; i < r.Length; i++)
|
||||
{
|
||||
if (s[i] != r[i]) break;
|
||||
}
|
||||
return r.Substring(i, r.Length - i);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $":{t.TotalSeconds.ToString("#0")}";
|
||||
}
|
||||
|
||||
}
|
||||
/*获取ip*/
|
||||
public enum ADDRESSFAM
|
||||
{
|
||||
@@ -145,7 +164,7 @@ namespace Assets.Scripts
|
||||
{"HeartRate","Heart Rate Monitor|Images/Devices/Heart Rate_3" },
|
||||
{"SpeedCadence","Cadence Sensor|Images/Devices/Cadence_3" },
|
||||
{"Speed","Speed Meter|Images/Devices/Speed_3" },
|
||||
{"Rower","Rower Machine|Images/Rower/设备 - 划船机" }
|
||||
{"Rower","Rowing Machine|Images/Rower/设备 - 划船机" }
|
||||
};
|
||||
}
|
||||
return _deviceDict;
|
||||
@@ -167,7 +186,7 @@ namespace Assets.Scripts
|
||||
/// <param name="showSeconds"></param>
|
||||
/// <param name="endCallback"></param>
|
||||
/// <param name="_parent"></param>
|
||||
public static void showToast(GameObject p, string text, int duration = 2, int type = 0, Func<bool> stopFunc = null, bool isLowest = false,bool showSeconds = false,Action endCallback = null,PFUIPanel _parent = null)
|
||||
public static void showToast(GameObject p, string text, int duration = 2, int type = 0, Func<bool> stopFunc = null, bool isLowest = false,bool showSeconds = false,Action endCallback = null,PFUIPanel _parent = null,bool isOnly = false)
|
||||
{
|
||||
var parent = UIManager.Instance.ModalsPanel;
|
||||
if (parent == null)
|
||||
@@ -185,6 +204,7 @@ namespace Assets.Scripts
|
||||
var toast = parent.transform.Find("ToastContainer");
|
||||
if (toast != null)
|
||||
{
|
||||
if (isOnly) return;
|
||||
MonoBehaviour.DestroyImmediate(toast.gameObject);
|
||||
}
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
@@ -891,6 +911,18 @@ namespace Assets.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerator ShareImageToWx(int scene, byte[] image)
|
||||
{
|
||||
if (App.weChatController.IsWeChatAppInstalled())
|
||||
{
|
||||
App.weChatController.ShareImageToWX(scene, image);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, "未安装微信");
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
public static string GetClipboard()
|
||||
{
|
||||
return UnityEngine.GUIUtility.systemCopyBuffer;
|
||||
|
||||
Reference in new issue
Block a user