2021-04-06 15:30:36 +08:00
|
|
|
|
using Assets.Scripts.Apis.Models;
|
2021-04-15 15:58:37 +08:00
|
|
|
|
using Assets.Scripts.UI.Prefab.Login;
|
2021-04-15 10:13:01 +08:00
|
|
|
|
using Assets.Scenes.Ride.Scripts.Model;
|
2021-04-02 19:17:23 +08:00
|
|
|
|
using System.Collections;
|
2021-03-25 16:53:39 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
2021-04-30 18:03:34 +08:00
|
|
|
|
using System.Net;
|
2021-06-04 13:19:37 +08:00
|
|
|
|
using System.Globalization;
|
|
|
|
|
|
using System.Threading;
|
2021-05-19 14:38:48 +08:00
|
|
|
|
using Assets.Scripts.Devices;
|
2021-03-25 16:53:39 +08:00
|
|
|
|
|
|
|
|
|
|
public static class App
|
|
|
|
|
|
{
|
2021-07-30 15:38:40 +08:00
|
|
|
|
public static string Host = "http://192.168.0.102:5082/";
|
2021-03-25 16:53:39 +08:00
|
|
|
|
|
2021-05-10 10:21:46 +08:00
|
|
|
|
public static string AppVersion = Application.version;
|
2021-03-25 16:53:39 +08:00
|
|
|
|
|
2021-04-01 14:09:23 +08:00
|
|
|
|
public static int RouteIdParam = 0;
|
2021-04-02 19:17:23 +08:00
|
|
|
|
public static UserResultModel CurrentUser { get; set; }
|
2021-04-06 15:30:36 +08:00
|
|
|
|
public static string WxAppId = "wx9e8ca734e024f084";
|
2021-06-07 13:51:13 +08:00
|
|
|
|
|
2021-04-14 15:02:33 +08:00
|
|
|
|
public static string MapBoxAccessToken => "pk.eyJ1IjoiYW5keXNqdCIsImEiOiJja2ZhajE5OGwwamRiMnltcW96bHk0ZWFuIn0.GvKanc6UveWSvIjS9HfBPA";
|
2021-04-16 17:49:11 +08:00
|
|
|
|
|
2021-04-26 16:25:52 +08:00
|
|
|
|
public static double latitude { get; internal set; }
|
|
|
|
|
|
public static double longitude { get; internal set; }
|
|
|
|
|
|
|
2021-04-16 17:49:11 +08:00
|
|
|
|
public static bool FromLogin = false;
|
|
|
|
|
|
|
2021-04-14 15:02:33 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 场景跳转传值
|
|
|
|
|
|
/// Name,MapListPanel
|
|
|
|
|
|
/// xxx,bbb
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static System.Collections.Generic.Dictionary<string, string> MainSceneParam = new Dictionary<string, string>();
|
2021-04-12 17:35:56 +08:00
|
|
|
|
public static IDictionary<string,Texture> TextureCache = new Dictionary<string, Texture>();
|
2021-04-15 17:09:35 +08:00
|
|
|
|
public static Texture CurrentUserHeadTexture;
|
2021-04-19 14:38:31 +08:00
|
|
|
|
public static RouteResult routeResult;//骑行记录向骑行场景传值
|
2021-04-26 16:25:52 +08:00
|
|
|
|
public static Texture DefaultRotateTexture;
|
2021-04-28 15:21:06 +08:00
|
|
|
|
//全局用 输入框或者下拉框修改标志位
|
|
|
|
|
|
public static bool isChanged { get; set; }
|
2021-04-29 11:36:30 +08:00
|
|
|
|
public static string notifyContent { get; internal set; }
|
|
|
|
|
|
|
2021-07-16 18:37:02 +08:00
|
|
|
|
public static RideSetting RideSetting = new RideSetting();
|
2021-04-30 10:32:01 +08:00
|
|
|
|
public static string pageName { get; set; }
|
|
|
|
|
|
public static int firstEnter { get; set; }
|
2021-04-30 18:03:34 +08:00
|
|
|
|
|
|
|
|
|
|
public static IPEndPoint UdpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
2021-07-09 18:16:50 +08:00
|
|
|
|
public static IPEndPoint TcpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
2021-05-10 10:21:46 +08:00
|
|
|
|
public static UpdateModel UpdateObject { get; set; }
|
2021-06-29 18:03:20 +08:00
|
|
|
|
public static int CompetionId { get; set; }//比赛id
|
2021-05-10 10:21:46 +08:00
|
|
|
|
//public static string AppDownloadUrl { get; internal set; }
|
|
|
|
|
|
//public static string AppVersionCode { get; internal set; }
|
|
|
|
|
|
|
2021-07-23 18:07:12 +08:00
|
|
|
|
public static List<JoinedCompetitionModel> JoinedCompetitionList { get; set; }//我参加的比赛
|
|
|
|
|
|
public static List<int> CompetitionIdList = new List<int>();
|
|
|
|
|
|
|
2021-05-19 14:38:48 +08:00
|
|
|
|
private static MainDeviceAdapter mainDeviceAdapter;
|
|
|
|
|
|
public static MainDeviceAdapter MainDeviceAdapter
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if(mainDeviceAdapter == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
mainDeviceAdapter = new MainDeviceAdapter();
|
|
|
|
|
|
}
|
|
|
|
|
|
return mainDeviceAdapter;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-07-29 20:01:38 +08:00
|
|
|
|
public static string CurrentScene { get; set; }//当前场景
|
|
|
|
|
|
|
2021-04-30 18:03:34 +08:00
|
|
|
|
static App()
|
|
|
|
|
|
{
|
2021-07-26 14:09:21 +08:00
|
|
|
|
//#if !UNITY_EDITOR
|
|
|
|
|
|
//// Host = "http://pf.juze.pro/";
|
|
|
|
|
|
//// UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
|
|
|
|
|
//// TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
|
|
|
|
|
// Host = "https://wx.powerfun.com.cn/";
|
|
|
|
|
|
// UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
|
|
|
|
|
|
// TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
|
|
|
|
|
//#endif
|
2021-04-30 18:03:34 +08:00
|
|
|
|
}
|
2021-03-25 16:53:39 +08:00
|
|
|
|
}
|